• 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.

[Trigger] Event Unit Expiration Timer Expired?

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
unit dies
killing unit == null

The reason why it would work:
When a unit dies, this is mostly because someone attacked him and dealt more true damage than he had as health.
The killing unit in triggers is the unit that applied the damage.
So if the killing unit is noone, then the unit got killed by noone.
And an expiration timer has noone to deal damage so it will make the killing unit null (aka nothing).

The reason why it wouldnt work:
Imagine killing the unit by triggers (not damage unit but kill unit) or some other way, then the killing unit is also null.
In this case, the unit didnt get killed by an expiration timer but does have a null killing unit.

The way to fix it:
Additionaly you can add it to a group or something when you start the timer.
Just to increase the chances that it was killed by the expiration timer.
Start a normal timer that expires just before the unit expiration timer would.
 
Status
Not open for further replies.
Top