• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to detect when unit acquires/looses item?

Status
Not open for further replies.
Alright, if you need items desperately the only choise atm is to make your own custom inventory using dialogs for example. And you must come with a new way to up with a way to pick up items, maybe there's an ability that activates like WC3 Eat Tree.

EDIT: You could use something like this:

Events
- Unit is issued an order targeting an object.
Local Variables
- TargetUnit = Target of issued order <Unit>
Conditions
- Triggering Unit == MyHero
- (TargetUnit) is an (Item) == true
- IssuedOrder == Follow/Move/Attack
Actions
- *Check Inventory Space*
- *Check Item Type for carry limits*
- * "drop" item or save and hide/remove it*
- *Update inventory view*
 
Status
Not open for further replies.
Top