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

Unable to die

Status
Not open for further replies.
Level 6
Joined
Jan 17, 2014
Messages
166
Dear hivers,

I want to make a cinematic when a unit is about to die. In the cinematic they do something. Just like in the warcraft series.
The problem is, if i want to use a trigger for it i use the event:
"Unit has less then 200hp". Because then it is out of reach for spells that do 199 dmg. But this leaves the unit with to much hp to feel defeated.
Is there a way that a life of a unit doesn't go below 1?
Or are there other ways of triggering?

Thx
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Damage absorption system. Detect fatal damage (since the event fires before damage is dealt so if current life - damage is less than 0.405 (some funny constant WC3 uses for death) then the unit will die and you can work on mitigation. Since it triggers a cinematic where health bars are invisible simply re-heal it to full life and do not care about that fraction of health it loses when damage is actually applied.
 
Status
Not open for further replies.
Top