Editors Depot - Mission Editing and Scripting > ArmA - Editing/Scripting General

Force a unit to stay alive in ARMA?

(1/1)

Rytuklis:
Command this allowDamage false doesn't work
Command this allowDammage false works, but it still makes a unit harmable. Help?

Gruntage:
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  :)

savedbygrace:
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.

Navigation

[0] Message Index

Go to full version