• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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