Jump to content
Sign in to follow this  
edfathead

Dead State + Alive State

Recommended Posts

Is there away to bring a dead unit back to alive state? I have tried "setdamage 0" but it does not work. It seems once a unit is passed 0.9 damage it is unrecoverable.

Share this post


Link to post
Share on other sites

Thats correct.

You can setPos the respawned body to the position where the old body was.

Share this post


Link to post
Share on other sites

Thanks for the reply but that did not help at all. :( maybe I need to provide more info.

I want an AI team member to be unkillable but still woundable. So I have tried all combinations of this allow damage false & <0.5 blah blah. I think I can make it happen if I can just put life back in a dead AI then say Set damage 0.9 simulating injury.

Am I making sence? ;)

Share this post


Link to post
Share on other sites

probably Event Handlers #HandleDamage is what you are looking for.

a simple rundown:

- get the actual damage of the unit

- check if actual damage + damage dealt > 0.99

- if true return "0" else return "damage dealt"

greetings Na_Palm

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×