Warcraft III resources & community, 2003–2006 · archived

If unit from UnitType dies -> remove corps

4 posts
#1

If unit from UnitType dies -> remove corps

Hello,
on the moment i'm building a map with several custom units who all have custom models. But i have a problem with one of them. If the unit dies, the model does not dissappear. Now i was wondering if anyone knew a way to build a script or something else that checks if a unit from a certain UnitType dies and then removes the corps of it. Thanks in advance
greetz,
Venom
#2
Unit - a unit dies

Unit type of (dying unit) = equal to (your unit)

wait 1 seconds
Unit - remove (triggering unit) from the game
#3
That will not work. There`s a problem with referencing triggers to units that are already dead. Maybe you can try this: When you spawn a unit using a trigger, add too the tigger actions ``Unit- make (last created unit) explode upon death.`` That way the unit will simply explode as if they had been bit by seige weaponry and not leave a corpse.
-VGsatomi
#4
what the? that doesn't work? it did in my map... :o
strange, very strange.