[Solved] preventing deadly damage?

Status
Not open for further replies.
Level 7
Joined
Jan 30, 2011
Messages
267
this has been asked a thousand times allready i guess, but i didnt find a proper answer between the millions of posts about damage prevention

so ill just take the freedom to ask it for the 1001st time

how do i prevent damage that would kill a unit?
 
Event: Unit takes damage (the event is only for a specific unit, so if you want it to work for many units, you have to add a new event for each one)
Condition: (damage taken) greater than or equal to (current health of triggering unit)
Action: make unit invulnerable, or set health to health + damage taken, or whatever

EDIT: You've posted 3 threads in quick succession, maybe you should rather ask all the questions in one thread next time :)
 
i had 2 issues with your way:
1. if the inflicted damage is higher than the units total health then it still dies
2. if the inflicted damage is higher than (Max health minus current health), then the remaing health of the unit is lower than before, so damage hasnt been prevented completely
 
Status
Not open for further replies.
Back
Top