The items always drop when you die, no matter if you are reviving using triggers or a revive ability, but you can work around it till they fix that.
What I did was when a unit dies, I look for every unit that is an item in the same exact position as the dieing unit and hide them. Then you wait for the respawn time, revive the unit, recreate every item you found earlier in the same point where the hero died on the hero inventory, then destroy the items on the ground.
The reason for hiding is because you can't manage the inventory of dead units.
Attachment is a screenshot of the trigger above.
I attempted to do it this way. My trigger looks identical to yours. However the custom script, UnitRevive(EventUnit()); doesn't seem to work.
The unit dies, and I even put a couple UI events to tell me that the trigger did get called.. but when the 5 seconds goes by, nothing happens. The unit never respawns. Any ideas?
Edit: I thought maybe somehow picking the inventory items might have screwed up "EventUnit" so I disabled everything but the respawn script.. still nothing.
@eshestun: Go
Worked like a charm.
Thanks!
I attempted to do it this way. My trigger looks identical to yours. However the custom script, UnitRevive(EventUnit()); doesn't seem to work.
The unit dies, and I even put a couple UI events to tell me that the trigger did get called.. but when the 5 seconds goes by, nothing happens. The unit never respawns. Any ideas?
Edit: I thought maybe somehow picking the inventory items might have screwed up "EventUnit" so I disabled everything but the respawn script.. still nothing.