BlackAlpha 10 Posted February 20, 2006 Is there a way to make a unit invulnerable? Share this post Link to post Share on other sites
Balschoiw 0 Posted February 20, 2006 Not really. This function has been removed from OFP to prevent people from using cheats. You can try to use a workaround though. Setup a looped script that will use the command "setdammage 0" over and over again for a specific unit. If a unit receives damage >= 1 by anything the script will fail though. So basically there is no real solution to your problem. Share this post Link to post Share on other sites
BlackAlpha 10 Posted February 20, 2006 Thanks anyway. I guess I'll just have to keep them alive some other way. Share this post Link to post Share on other sites
Balschoiw 0 Posted February 20, 2006 If you don´t want to have them targetted use "unitname setcaptive true" in their init. You can change that later on by using a trigger and use "unitname setcaptive false" in the OnActivation Share this post Link to post Share on other sites
Migebuff 0 Posted February 20, 2006 player addeventhandler ["hit",{player setdammage 0}] player addeventhandler ["dammaged",{player setdammage 0}] Share this post Link to post Share on other sites
j w 0 Posted February 21, 2006 EDIT: Thanks for correction InqWiper Share this post Link to post Share on other sites
InqWiper 0 Posted February 21, 2006 Less beliefs and more tries. It takes less than 2 minutes to go into OFP and try it. No reason to say you dont think it works. It does work, Ive used it several times. I have never died with those 2 eventhandlers. Share this post Link to post Share on other sites
j w 0 Posted February 22, 2006 But if you get wacked by a headshot, you should stay dead. Right? Share this post Link to post Share on other sites
karantan 0 Posted February 22, 2006 Right. So IMHO such commands are meant to be used only for the in-mission cutscenes or something similar; whenever the player needs to stay alive 'at all costs', not in some (serious) mission. Share this post Link to post Share on other sites