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

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 64
Joined
Jan 18, 2005
Messages
27,258
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