• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Event: Unit is attacked

Status
Not open for further replies.
Level 20
Joined
Oct 21, 2006
Messages
3,231
As we know GUI "unit is attacked" event triggers even if you dont end your attack. So you can attackstopattackstopattackstop to activate the trigger. But with JASS theres a function or something that makes it possible to have the event when the unit is "really" attacked.

I dont know anything about JASS, but isnt it possible to have an event made by JASS and then it runs some GUI trigger?
 
Level 15
Joined
Feb 15, 2006
Messages
851
Actually there's the famous EVENT_UNIT_DAMAGED trigger event, which activates when a specified unit is about to receive damage. The bad thing is that it's not a general trigger and you have to set it for each unit in your game.

And it can be accessed via GUI: is in the Specific unit events.
 
Level 20
Joined
Oct 21, 2006
Messages
3,231
"Damage detection system" is that what I mean. Or does that also count damage done by spells?>>

But I once made a trigger with JASS (yes very nooby trigger) that there was action that "run guitriggernamehere" or something.
 
Status
Not open for further replies.
Top