- Joined
- Feb 20, 2007
- Messages
- 338
I have enemy units that drop 12 types of items upon their decay/death (creep drop upon death via object editor). They are given the hero inventory and classification of 'a hero' upon creation.
I have 5 types of non-hero units that have back back abilities - they are able to carry 2 items.
The trigger below is what I have tried, mind the italics function I tried first and then I tried the other one.
How can I get non-hero units to automatically pick up these dropped items?
I have 5 types of non-hero units that have back back abilities - they are able to carry 2 items.
The trigger below is what I have tried, mind the italics function I tried first and then I tried the other one.
-
ItemDrop
-
Events
- Unit - A unit owned by Player 10 (Light Blue) Loses an item
-
Conditions
- (Item-class of (Item being manipulated)) Not equal to Powerup
-
Actions
- Item - Set the custom value of (Item being manipulated) to 2
- [I]Unit - Order (Random unit from (Units within 2000.00 of (Position of (Last dropped item)))) to Right-Click (Item being manipulated)[/I]
- Hero - Give (Last dropped item) to (Random unit from (Units within 2000.00 of (Position of (Last dropped item))))
-
Events
How can I get non-hero units to automatically pick up these dropped items?