| 11-06-2004, 04:08 PM | #1 |
How would I make it so when an item drops, it only stays on the ground for a certain time? I thought this would work E: unit dies A: drop item A: wait 10seconds remove ??? item however which item do I remove, because if another item drops within the 10seconds then it would only remove the 2nd item and the 1st would be there forever |
| 11-06-2004, 06:14 PM | #2 |
Guest | i cant think of any way to give items a decay. youd set a variable for each item that is dropped then remove the variable item. one way i can think of, if you have say 12 players with one hero each, is have 12 varable arrays, say HeroItemsP!() for the first player. then make a trigger for each player like so: Code:
Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
(Owner of (Dying unit)) Equal to Player 1 (Red)
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set HeroItemsP1[(Integer A)] = (Item carried by (Dying unit) in slot (Integer A))
Wait 10.00 seconds
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Item - Remove HeroItemsP1[(Integer A)]that should work for that specific case. though maybe someone else can think of a simpler way to do it. if your map uses multiple heros for each player that wouldnt work, but hopefully it will still help you get closer to your solution. |
