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

Make unit immune to death (not invulnerable)

Status
Not open for further replies.
Level 2
Joined
Feb 17, 2017
Messages
26
Hi everyone,

So I was planning to create a trigger that would start when a specific unit on a map reaches precisely 1 hit point (start a cinematic upon a boss' near death).

So far so good I can create such a trigger, but here is the problem I face:
Enemies will obviously deal in general more damage than 1. So when said boss is, let's say at 2 hp, a single blow from a footman would kill the unit without triggering the cinematic.

That's why I was wondering if I could make the unit temporarily immune to death, so that its hit points will never go below 1, without making him invulnerable.

I was thinking of some kind of loophole maybe with invulnerability, and make triggers allow to target the boss, but that would obviously lead to the same result.

Some ideas? I'm ok with any loophole you can come up with, just as long as it looks like the boss' health doesn't go below 1.

Thanks in advance
 
One could manipulate damage taken. Cause this is only for 1 unit -> you won't even need custom systems.

  • Don't Die by Damage
    • Events
      • Unit - Boss Takes damage
    • Conditions
      • (Damage taken) Greater than or equal to (Life of (Triggering unit)) - 0.405 (units die with ~0.405 life)
    • Actions
      • Event Response - Set Damage of Unit Damaged Event to ((Life of (Triggering unit)) - 1.00)
      • -------- start your cinematic --------
      • -------- After the cinematic is done disable Don't Die by Damage --------
 
Last edited:
Level 2
Joined
Feb 17, 2017
Messages
26
I found out thanks to your advice another trick that works well: with the same condition, if the damage taken is greater than or equal to what it would take to kill it, instantly make the boss invulnerable and pause it to stop the combat. Then start cinematic and add a kill trigger at the end of the cinematic.
Thanks a lot for your help
Though I wonder why units would die at 0.5 hit points... But I trust you about that, I think I saw it somewhere in the tutorials once.
 
Status
Not open for further replies.
Top