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

A question on "EVENT_UNIT_DAMAGE"

Status
Not open for further replies.
Level 11
Joined
Sep 14, 2009
Messages
284
This is just a little thing I discovered when I was developing my damage detection system and was wondering if it is suppposed to be this way or if the fault is in my map somewhere (though I doubt it).

It appears that the event
JASS:
EVENT_UNIT_DAMAGED
is triggered BEFORE the damage is actually dealt. o_O

When I tried to get the damaged unit's HP immediately after the event was triggered, the unit wasn't even damaged yet. When I inserted
JASS:
call TriggerSleepAction(0.01)
the damaged unit's HP was lowered correctly by the damage.

I just thought it'd be good to share this discovery. Or maybe DDS developers already know this?
 
Status
Not open for further replies.
Top