• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

(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 63
Joined
Jan 18, 2005
Messages
27,170
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