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

Make Unit Unkillable

Status
Not open for further replies.
Level 10
Joined
Jun 16, 2007
Messages
415
Hey, I am trying to make a spell like DotA's "Shallow Grave" spell. For those of you who don't know what this spell is, here is a description:

Target allied hero will not be able to die for the next X seconds. Damage taken by this hero will not be able to drop the heroes health below 1, thus any damage taken by the hero will alter his hp but not kill him.

If anyone knows how to achieve this effect, please post.
Thanks in advance and +rep to people who help.
 
Level 10
Joined
Jun 16, 2007
Messages
415
No no, see for I don't want to prevent the unit from taking damage, just from taking lethal damage. So that if it takes 50 damage and has 100hp its health drops to 50. But when it has 30 health and takes 50 damage its health drops to 1 instead of dying.


EDIT: I just tried what you said and stunningly it works. I did not realize that the Damage Taken trigger fires before the damage is actually dealt to the unit. Thanks.
 
Status
Not open for further replies.
Top