• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗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?
 
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.
 
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.
Back
Top