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

[General] Does unit event only available for pre-placed unit?

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,097
Changing the variable afterwards does not help, as this does not modify what the event has been registered on. And you often are good to go with the playerunitevent-variant:

call TriggerRegisterPlayerUnitEvent(gg_trg_swzydie, Player(0), EVENT_PLAYER_UNIT_DEATH, null)

This makes the trigger fire for any unit of Player(0)'s death.
 
Level 11
Joined
Oct 11, 2012
Messages
711
Changing the variable afterwards does not help, as this does not modify what the event has been registered on. And you often are good to go with the playerunitevent-variant:

call TriggerRegisterPlayerUnitEvent(gg_trg_swzydie, Player(0), EVENT_PLAYER_UNIT_DEATH, null)

This makes the trigger fire for any unit of Player(0)'s death.

Do you mean the death of all the units controlled by Player(0)? What if I just detect a specific unit's death? Adding a condition?
 
Status
Not open for further replies.
Top