Somerville 0 Posted April 1, 2008 Hi, I'm trying to make some units invincible, so that players can't ruin the game for other players. So far I've tried putting this in the init line for units I don't want to die: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addeventhandler ["hit", {_this select 0 setdamage 0}]; But that's not working with all of them. Some are just normal civilians, but they still die with this in the init line. Does anyone have any suggestions on alternatives, or why this current approach isn't working? Share this post Link to post Share on other sites
loyalguard 15 Posted April 1, 2008 You also need to include a "damaged" event handler to be failsafe. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addEventHandler ["dammaged",{(_this select 0) setDamage 0}]; this addEventHandler ["hit",{(_this select 0) setDamage 0}]; Although, some instant kills (headshots and possibly large explosions) may still not prevent death. Lots of threads on the topic. Just enter invincible as the search term, ArmA Editing in the forums selector, and search from this year. Good luck! Share this post Link to post Share on other sites
fasad 1 Posted April 1, 2008 I've had ArmA crash when using multiple EV for this purpose, and being sustained to large amounts of enemy fire. Share this post Link to post Share on other sites
Rommel 2 Posted April 1, 2008 setdammage -500 works better, completely invincible. (Ty to Wolfrug for teaching me this ) Share this post Link to post Share on other sites