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

[JASS] Any unit takes damage

Status
Not open for further replies.
Registering events require 3 parameters:
1) The trigger you're adding the event to
2) In the case of Unit events: a unit
3) The actual event: in this case EVENT_UNIT_DAMAGE
The result should look like
TriggerRegisterUnitEvent(gg_trg_mytrigger, myunitvar, EVENT_UNIT_DAMAGE)
Thus, you'll need an event for each separate unit entity...
 
Unfortunately, you cannot detect when ANY unit takes damage, it is unit specific. However, because of handle systems, you can use a call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_ATTACKED), then attach that unit to create another trigger and work from there.
 
its not any unit takes damage
its unit gets attacked
there is no AnyUnitTakesDamage in JASS by default

I have this
Requires this tool

U seem quite new
That tool can help you (shows functions and what they take)
and the system I linked has
TriggerRegisterDamageEvent(<trigger>)
 
Status
Not open for further replies.
Back
Top