Jump to content
Sign in to follow this  
DNP

Deactivating a Tanks ability to shoot, then activating it again with a trigger

Recommended Posts

Maybe set tank behavior as "careless" or remove/add ammunition to tank when needed.

Share this post


Link to post
Share on other sites

how do i add ammunition? [through scripting]

Share this post


Link to post
Share on other sites

Removemagazineturret and addmagazineturret.

Check on bi wiki how to use ;)

Share this post


Link to post
Share on other sites

This can be accomplished in several ways. If you want all the weapons of the tank inactive you might most easily remove all its ammunition using the ammo slider to the extreme left when placing the vehicle in the editor. It may also be the case that you only wish to disable one of its weapons, for example the main gun, and in that case you would leave the slider as is and add an instruction for particular types of magazines to be removed in the initialisation line of the vehicle. If it is an Abrams tank where you would just like to disable the ability of the main gun, then you would remove the HE and Sabot magazines with the instruction:

this removemagazine "20Rnd_120mmSABOT_M1A2"; this removemagazine "20Rnd_120mmHE_M1A2";

or:

anAbrams removeMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]]; anAbrams removeMagazineTurret ["20Rnd_120mmHE_M1A2",[0]];

In the trigger you could then add the magazine again, though there you would need to specify the name of the vehicle (for example anAbrams), by putting a text in the on activation field:

anAbrams addmagazine "20Rnd_120mmSABOT_M1A2"; anAbrams addmagazine "20Rnd_120mmHE_M1A2";

or:

anAbrams addMagazineTurret ["20Rnd_120mmSABOT_M1A2",[0]]; anAbrams addMagazineTurret ["20Rnd_120mmHE_M1A2",[0]];

The lists of magazines can be found on the BIS Wiki:

Arma 2 weapons

Operation Arrowhead and DLC weapons

Regards,

Sander

Edited by sander

Share this post


Link to post
Share on other sites

behavior as careless would be better as if they encounter enemy without ammo, they will either try to "surrender" or drive somewere far away. shorter aswell:

tank1 setBehaviour "CARELESS";

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  

×