• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Event Unit Expiration Timer Expired?

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
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