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

(1.31) Custom script: "Any unit takes damage" event

Status
Not open for further replies.
Level 3
Joined
Sep 15, 2011
Messages
56
The recent patch to 1.31 had, in the notes, a reference to new capability for custom scripts to detect when any unit is damaged for a trigger event. Does anyone know how exactly I would write such an event in custom script?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Does anyone know how exactly I would write such an event in custom script?
The same as with any player unit event.
JASS:
call TriggerRegisterPlayerUnitEvent(YourTrigger, YourPlayer, EVENT_PLAYER_UNIT_DAMAGED, null)
Note this was constructed for the 1.31 PTR, I have not updated the native list of the program I used to look up the names for 1.31 release.
 
Level 3
Joined
Sep 15, 2011
Messages
56
The same as with any player unit event.
I've never used custom scripts for any player unit event; I've always used GUI. This is why I was asking, because so far, I've used actions to add an event to another trigger to detect unit damage. But I'd rather have a way to do this without needing an indexer. Thanks!
 
Status
Not open for further replies.
Top