OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Rytuklis on 15 Feb 2013, 20:26:17

Title: Force a unit to stay alive in ARMA?
Post by: Rytuklis on 15 Feb 2013, 20:26:17
Command this allowDamage false doesn't work
Command this allowDammage false works, but it still makes a unit harmable. Help?
Title: Re: Force a unit to stay alive in ARMA?
Post by: Gruntage on 15 Feb 2013, 21:42:42
You need to use a 'hit' eventhandler. If you search for 'making units tougher' and 'invincibility', you're bound to find the answer to your question  :)
Title: Re: Force a unit to stay alive in ARMA?
Post by: savedbygrace on 14 Mar 2013, 02:33:12
It also really depends upon the amount of damage the unit sustains at once before the handler, or script can take effect. If the damage instantly inflicts total damage, such as an explosion, the handler will not likely be quick enough to reset the damage.

Hit handlers are quick but a fast looping script is quicker. Since it is continuously running and seeing as how you would only want it for testing or cinema, you wouldn't need it for long or in broad capacity, so its effect on CPU would be minimum.

Just have a looping script constantly setting the damage of the player/unit to 0.