Jump to content
M1ke_SK

remove action when item dropped from inventory

Recommended Posts

Basically when player take item, it will give him action, for example if he take radio to inventory, he can call air-strike with action menu. I am using eventHandler "Take" to add addAction to player.

 

Question: How to remove added action when user "TakeOut" item from inventory?

 

I did not find magic eventHandler for that.

 

Ideas:

- loop to unit and constantly checking if item is in inventory

InventoryClosed eventHandler

 

Edit:

I managed with 1st idea (loop), but still searching for optimal solution.

 

Share this post


Link to post
Share on other sites
player addAction ["Drop Item", { }, [], 1.5, true, true, "", "'Item_Class_Name' in items player"];

 

Share this post


Link to post
Share on other sites

The opposite of Take is Put, although the event description says when player puts item in a container, it actually works when you drop an item on the floor, for example, as you are actually placing the item in a weaponHolder. Or as you suggest use InventoryClosed to check that item is still in players inventory.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×