Jump to content
Sign in to follow this  
priorzeus

Invincibilty on vehicles and infantry in single player scenarios and campaign

Recommended Posts

Greetings guys,

I was wondering if some veteran on this forum could tell me how I could obtain invincibility on my squad members and certain vehicles in single player. Is it a case of having to transfer all the mission files and put them into the editor that is in the game, insert script in init field, save and put them back into the original mission folder or is there an easier way via MCC sandbox? I have heard you can do some great things like editing campaign missions with MCC Sandbox so I downloaded MCC Sandbox 2, (not 4, as I think that only works on Arma 3). I thought it might be a simple case of clicking on an existing unit via 3D editor mode and then an init field would pop up allowing me to enter the script but nothing happens when I click on a unit. I have heard of people having managed this in MCC sandbox 4 regarding Arma 3 and just wondered how to implement this in Arma 2 as the GUI is different from MCC Sandbox 4. The various scripts I have found while trawling these forums are:

this addEventHandler ["handleDamage", { false }];

this addeventhandler ["hit", {(_this select 0) setdamage 0;}];

this addeventhandler ["dammaged", {(_this select 0) setdamage 0;}];

{ _x allowDamage false; } forEach (units group player); { _x enableFatigue false; } forEach (units group player); player allowDamage false; player enableFatigue false;

_this addEventHandler ["Fired",{[_this select 0,getNumber (configFile/"CfgAmmo"/(_this select 4)/"explosive")] spawn {if (_this select 1==1) then {sleep 0.75};_this select 0 setVehicleAmmo 1}}]; _this allowDamage false;

I am just not certain how to execute them :confused:.

My apologies for being a noob.

Share this post


Link to post
Share on other sites
I am just not certain how to execute them :confused:.

Add this code into init field of group's leader:

{_x addEventHandler ["HandleDamage", {false}]} forEach (units (group this));

Share this post


Link to post
Share on other sites
Add this code into init field of group's leader:

{_x addEventHandler ["HandleDamage", {false}]} forEach (units (group this));

Thank you for your reply. Is there a method of entering this via MCC Sandbox or will I have to use the in-game editor to accomplish this?

Share this post


Link to post
Share on other sites

this allowDamage false;

You need to open the editor and open the scenario.

Then insert the command into any soldier, vehicle or object that you wish to be invincible.

The command only works in Single Player.

It is very useful if you wish to test something and don't want to get killed!

.

Share this post


Link to post
Share on other sites
this allowDamage false;

You need to open the editor and open the scenario.

Then insert the command into any soldier, vehicle or object that you wish to be invincible.

The command only works in Single Player.

It is very useful if you wish to test something and don't want to get killed!

.

Cheers guys, I will try it out! :icon14:

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  

×