Jump to content
Sign in to follow this  
jpinard

A-10's and Cobra Gunships - how to make them guns only?

Recommended Posts

I'm doing some sound testing (and mission scripting) and I need to make the all the helicopters and jets "guns" only. So their loadout carries ZERO bombs. I want to pre-assign this in the mission editor. How do I do this?

Thanks!

Share this post


Link to post
Share on other sites

An on-the-fly method you can use:

hint format ["%1 %2",weapons this,magazines this]

When you test it, it will give you the weapons and magazines for the unit. Counting from 0 on the weapon list, you can remove the unwanted weapons like this:

this removeweapon (weapons this select x)

Where x is the weapon number in the weapons array.

Working example:

hint format ["%1 %2",weapons this,magazines this] (used on AH-1Z might return: ["M197","HELLFIRELAUNCHER","HydraLauncher"] ["M197_750rnd","HELLFIRE_8rnd","Hydra_38rnd"]

Then you would use this in the init field:

this removeweapon (weapons this select 1); this removeweapon (weapons this select 2)

Which would remove the weapons "HELLFIRELAUNCHER" and "HydraLauncher".

A little more complicated but saves you from having to skip around documents trying to find the current weapons on the unit.

Share this post


Link to post
Share on other sites

I just spent the last hour on this (didn't know if anyone would up this late) and this is what I came up with on my own for the A10:

this removemagazines "2Rnd_Maverick_A10";this removemagazines "2Rnd_Sidewinder_AH1Z";this removemagazines "14Rnd_FFAR";this removemagazines "4Rnd_GBU12"

I came to this by going backwards from adding a Javelin to a soldier. In another vein when I try to add ammo I'm having no success. What is the context for how many rounds/magazine you want to give them? is it just a comma, then the number you want them to have? ie. Giving my guy a Javelin antitank and want to also add 3 rounds (so far I can add the Javelin with the magazine syntax, but ammo syntax doesn't work):

this addweapon "Javelin";this addammo "M_Javelin_AT",3
<-------- so far that doesn't work Edited by jpinard

Share this post


Link to post
Share on other sites

You have to add multiple magazines individually, not all at once.

ie this addmagazine "Mag"; this addmagazine "Mag" etc. until you've given them the number of mags you want.

Share this post


Link to post
Share on other sites

here's part of a script i use to uparm the A10 amongst other planes and choppers

			if(_type == "A10") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "6Rnd_Mk82";
			_vec addMagazine "6Rnd_Mk82";
			if(not ("Mk82BombLauncher_6" in _weapons)) then {_vec addweapon "Mk82BombLauncher_6"};
			_vec removeMagazine "1350Rnd_30mmAP_A10";
			_vec removeMagazine "1350Rnd_30mmAP_A10";
			_vec addMagazine "1350Rnd_30mmAP_A10";
			_vec addMagazine "1350Rnd_30mmAP_A10";
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			if(("FFARLauncher_14" in _weapons)) then {_vec removeweapon "FFARLauncher_14";_vec removeMagazine "14Rnd_FFAR"};
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			if(not ("FFARLauncher" in _weapons)) then {_vec addweapon "FFARLauncher"};
		};

you can borrow parts of this to remove weapons or mags

note - as franze said - we don't deal in ammo, just in mags and weapons...

Share this post


Link to post
Share on other sites

If you run the hint format ["%1 %2",weapons this,magazines this] command you already know the weapon/magazine names and can just remove them directly.

removeAllWeapons does not seem to work with vehicles, only removeWeapon.

eggbeast, I doubt an A-10 armed like that would even be able to stay up in the air IRL :)

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  

×