- Joined
- Jan 21, 2006
- Messages
- 2,552
When a unit dies, it triggers a few event responses.
The last one is only registered if the unit has the "defend" ability, in which case it is ordered "undefend". When the unit is removed from the game (after being killed) it registers another "undefend" ability.
Does anybody know which of these is the fastest? I have a unit-data system that uses the event from
TriggerRegisterDeathEvent
TriggerRegisterUnitEvent...EVENT_UNIT_DEATH
TriggerRegisterUnitEvent...EVENT_UNIT_ISSUED_ORDER
The last one is only registered if the unit has the "defend" ability, in which case it is ordered "undefend". When the unit is removed from the game (after being killed) it registers another "undefend" ability.
Does anybody know which of these is the fastest? I have a unit-data system that uses the event from
TriggerRegisterDeathEvent
to detect when the unit dies, but at the same time I have an event registered by TriggerRegisterUnitEvent
that will tell me when the unit is ordered "undefend". I'm wondering if I should base the unit's "death" as the unit is ordered "undefend" or just use that to figure out when the unit is removed from the map entirely (in which case I can get rid of the unit-data for that specific unit).