Jump to content
Sign in to follow this  
Mage

Custom Aircraft Loadout help

Recommended Posts

Hello Gentlemen, I'm building an air battle mission.

However, I need to create a custom loadout for 3 aircraft.

I was wondering how can this be done (scripting-wise) I am trying to load the aircraft with sidewinder missiles only.

I bought arma 2 like a month ago so I'm kind of new to this scripting language, I suppose it needs a command to strip the ammunition off the plane and recreate the loadout with sidewinders?

any help is greatly appreciated

Also, if theres a kind soul out there who wants to give me a hand with this other bit that'll be great also:

I need to make the runway fix/refill/reload ammunition to whatever aircraft lands and stops to 0 speed there.

Thank you all for your time and as soon as I get this thing sorted I'll share the mission with whoever is interested at taking a peek at it :)

Share this post


Link to post
Share on other sites

It can be done, but if the plane where you are putting them doesn't have sidewinders modelled, they won't show under wings (but still work).

To clear the weapons...

removeAllWeapons unitName

(or unitName removeWeapon weaponName for all unwanted)

to add a magazine...

unitName addMagazine magazineName

e.g... myplane addMagazine "4Rnd_Sidewinder_AV8B";

to add a weapon (not needed if it has a proper weapon)

unitName addWeapon weaponName

e.g. myplane addWeapon "SidewinderLaucher";

You can place those commands into the init block of the planes (no separate script files needed). In that case you can use the word "this" to point to the same object (e.g this addWeapon "SidewinderLaucher"; )

You can see what commands are available here...

http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2

weapon and magazines name are here...

http://community.bistudio.com/wiki/ArmA_2:_Weapons

The second question:

Fast solution:

1) place reammo, repair and refuel trucks at the end of the runway. (it might be it won't work properly if you have changed the weponry)

More complex solution:

1) Make a trigger at the airfield where you want to place the supply point

2) make it present BLUEFOR and make the condition "this and trig==0"

3) add the following commands to the activation execution block:

{ if( speed _x < 1 ) then { _x setDamage 0; _x setFuel 1; _x removeMagazines "4Rnd_Sidewinder_AV8B"; _x addMagazine "4Rnd_Sidewinder_AV8B"; }; } forEach _thisList; trig = 1;

4) ...and to the deactivation block... "trig= 0";

5) Create a game logic object (or actually any object will do) and put into the init line "trig=0"

That has few points not making it very polished, but it should work assuming I haven't made any typos. Also it doens't require separate files.

Share this post


Link to post
Share on other sites
It can be done, but if the plane where you are putting them doesn't have sidewinders modelled, they won't show under wings (but still work).

Not true anymore in ArmA 2. This was the case in OFP and ArmA 1 but in ArmA 2 the correct weapon proxy is showed.

In the past (pre-ArmA 2) it was necessary to create a unique plane model for each desired weapon loadout with the corresponding missile proxies.

Now in ArmA 2 you can have a "one-size-fits-all" plane model and change weapon loadout by simple assigning the desired weapon. Check my ArmA 2 conversion of Footmunch's F-16, it uses this technique to introduce the F-16 with 5 completely different loadouts.

It still has one problem: if you add more than 1 magazine of a similar type, the missiles show correctly but when the first magazine is emptied, when the weapon reloads, the remaining missiles switch places with the previous (now empty) places. Not a functionality problem as the missiles do work but it looks weird when missiles switching pylons midflight. ;)

For rearming: ArmA 2 does in fact reload the latest added weapons, regardless of the original loadout. So no problems there with simple rearm procedure at Ammotrucks.

Share this post


Link to post
Share on other sites

Thank you guys, that did the trick. I managed to add 6 sidewinder missiles to the aircraft and remove the others that couldn't be locked on target.

While the problem is solved (Thanks a bunch again!) another question rose:

When the player is in the aircraft, the top-right screen hud shows for example: Sidewinder 2 | 6

so after I fire these two, it takes a few until the sidewinders are available again. Is there any chance to make it look like 6 | 6, or just 6, so that 6 missiles can be fired without delay?

I'm recreating an air battle in which a formation of F35 has to missile down some fighters flying over Chernarus so that infantry can advance on the ground.

Also, I made a trigger on the side of the runway with the following:

this setFuel 1; this setVehicleArmor 1; this setVehicleAmmo 1; and added a text effect with the following: Aircraft under maintenance. Refueling, Reloading Ammunition and Repairing. Please Stand By.

Works like a treat, but i can't figure out how to make the aircraft be restricted from taking off instantly to give a slight feeling of realism as you only literally need to drive over the trigger to get it fixed.

I was thinking (again, due to my scripting limitations as im really new to this) that this could be achieved setting the speed of the aircraft to 0 for a few seconds so that the pilot is unable to taxi and takeoff? and after a timeout of let's say 30 seconds add a text message that says something like "Aircraft Maintenance Completed. Ready to Taxi And Take-Off" and then allow the pilot to taxi and takeoff at the default speed of the aircraft?

On another note I'm loving this game a bit more each day. Convincing my friends to get it.

Share this post


Link to post
Share on other sites

I confess I haven't tryed those exact things in Arma2 yet, but I was quite sure it would be similar as in Arma1. But...

1) How does Arma2 know where to put the added sidewinders? If the model doesn't have sidewinder proxies I would have guessed they are fired from the center.

2) Reammo truck...do you mean the game remembers what has been the max number of sidewinders in your vehicle? I was certain it would have looked that from the config, but how the heck if it has no sidewinders in the config :confused:

---------- Post added at 07:10 PM ---------- Previous post was at 06:11 PM ----------

While the problem is solved (Thanks a bunch again!) another question rose:

When the player is in the aircraft, the top-right screen hud shows for example: Sidewinder 2 | 6

so after I fire these two, it takes a few until the sidewinders are available again. Is there any chance to make it look like 6 | 6, or just 6, so that 6 missiles can be fired without delay?

That's because all ammo are in magazines (missiles too in the config even in reality magazine might be a bit odd concept here). That means the current magazine has 2 mssiles left and you have 6 full mags left...hmmmm...are you modelling a B-52?. All weapons have a reload delay (how much interval between each shot->rate of fire) and magazine reload time. The delay in your case is this mag reload delay. I cannot think any other solution right now than to make your own sidewinder launcher (that's another story and not so short).

Or you could use "SidewinderLaucher" instead of "SidewinderLaucher_F35". The first one uses 4 missile magazines (4Rnd_Sidewinder_AV8B) in Harrier style and not just 2 missile mags. That would help a bit.

Also, I made a trigger on the side of the runway with the following:

this setFuel 1; this setVehicleArmor 1; this setVehicleAmmo 1; and added a text effect with the following: Aircraft under maintenance. Refueling, Reloading Ammunition and Repairing. Please Stand By.

Works like a treat, but i can't figure out how to make the aircraft be restricted from taking off instantly to give a slight feeling of realism as you only literally need to drive over the trigger to get it fixed.

Hey even in F1 they sometimes leave the pit before the refuel is ready ;)

You could make it refuel and reload slowly instead of restriction, like this in the trigger...

this setFuel ((fuel this)+0.1)

this setDamage (0 max ((damage this)-0.1))

This works because triggers are tested and fired only every 1 or 0.5 secs (iirc) (you cannot put sleep into triggers or called scripts). Slow reammo is bit trickier, because there is no getVehicleAmmo.

I was thinking (again, due to my scripting limitations as im really new to this) that this could be achieved setting the speed of the aircraft to 0 for a few seconds so that the pilot is unable to taxi and takeoff? and after a timeout of let's say 30 seconds add a text message that says something like "Aircraft Maintenance Completed. Ready to Taxi And Take-Off" and then allow the pilot to taxi and takeoff at the default speed of the aircraft?

I would make it like above, but if you want that I would make a script. Also if you test things like speed, do no test speed==0, because it hardly ever is exactly 0. Make it like speed < 1 or (abs speed)<1, because it can be sub zero when reversing. Also note that any vtol capable plane can be at 0 speed even they are not landed. To test altitude you can put "getPos this select 2", because positions are in x,y,altitude array.

On another note I'm loving this game a bit more each day. Convincing my friends to get it.

You have seen the light my friend.

Share this post


Link to post
Share on other sites

cheers man, good tips, as for the hover over trigger don't worry, it won't trigger unless you literally step on it. I hovered with a helo on top of it and didnt fix it, but if i land it or drive on top of it it does so that's one doubt discarded.

Again, I'm new to this scripting language (fortunately not to programming in general so I can 'think in scripting' per say) and I was guessing that once the aircraft triggers the event, its speed is set to 0 and on timeout to reset it, so that once you walk into the trigger you you can't get out! hehe.

as if there was some sort of hook that won't release the plane until the desired amount of seconds expire.

is there anyway to create a folder and put my scripts and mission within so I dont have a bunch of files all over my mpmissions folder?

Share this post


Link to post
Share on other sites

is there anyway to create a folder and put my scripts and mission within so I dont have a bunch of files all over my mpmissions folder?

When the missions are in works (not exported to SP or MP missions), they are in individual folders in /My documents/Arma 2 other profiles/(your name here)/missions/(mission name).(mapname) You can put your script etc files in these (or even create sub folders). When you export them, they are converted to pbo and put into the in game missions folder.

Share this post


Link to post
Share on other sites

I am also trying to set custom weapon load outs for arma 2, on the Av-8B this time, but I cant get removeAllWeapons unitname to work on any aircraft, it only seams to work on units (ie infantry). I’ve not even got to adding weapons yet. Been though the tread a few times and I can’t see what I’m doing wrong.

Did something change with patch 1.5 or am I just doing something very wrong.

---------- Post added at 07:49 PM ---------- Previous post was at 06:59 PM ----------

Got it to work it I do per weapon and mag, still would be a lot better if there was a remove all that worked…

Share this post


Link to post
Share on other sites

I have custom loadouts working in evolution for almost all planes and choppers - see code below for some ideas. The new AH64d_Sidewinders vehicle has an 8 sidewinder magazine that I'm well up for putting ont othe F35 now, instead of 2x4 which it has atm.

BIS_EVO_Repair = 
{
_vec = (vehicle player);
_type = typeOf vehicle player;
if(getDammage _vec > 0 or fuel _vec < 0.98 and not (_vec isKindOf "Man")) then
{
	_inrepairzone = ((_vec in list AirportIn) or (_vec in list farp1) or (_vec in list farp2) or (_vec in list farp3) or (_vec in list reng1) or (_vec in list reng2) or (_vec in list reng3) or (_vec in list reng4) or (_vec in list dock1) or (_vec in list dock2));
	if(((_vec in list AirportIn) or (_vec in list farp1) or (_vec in list farp2) or (_vec in list farp3) or (_vec in list reng1) or (_vec in list reng2) or (_vec in list reng3) or (_vec in list reng4) or (_vec in list dock1) or (_vec in list dock2)) and _vec != player and speed _vec > -2 and speed _vec < 2 and position _vec select 2 < 2.0 and (local _vec)) then
	{

		 titleText [localize "STR_M04t83", "PLAIN DOWN",0.3];
		 for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do
		 {
		    sleep 0.200;	    		    
		    if (getDammage _vec > 0) then {_vec setDammage ((getDammage _vec)-0.0125);};
		    if (Fuel _vec < 1) then {_vec setFuel ((Fuel _vec)+0.0125);};
		    if (getDammage _vec == 0 and Fuel _vec == 1) then {_loop2=1;};
		    if(_vec != vehicle player or speed _vec < -2 or speed _vec > 2 or position _vec select 2 > 2.0) then {_loop2=1;titleText [localize "STR_M04t84", "PLAIN DOWN",0.3];};
		    _dam = (getDammage _vec)*100;
		    _ful = (Fuel _vec)*100;
		    hint format["Damage: %1\nFuel: %2",Round _dam,Round _ful];
		};
		_vec setVehicleAmmo 1;	
//adding cheats to planes
		if(_type == "A10") then 
		{
			_weapons = weapons _vec;
			if(not ("Mk82BombLauncher_6" in _weapons)) then {_vec addweapon "Mk82BombLauncher_6"};
			_vec removeMagazine "6Rnd_Mk82";
			_vec addMagazine "6Rnd_Mk82";
			_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";
			if(not ("FFARLauncher" in _weapons)) then {_vec addweapon "FFARLauncher"};
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
		};

		if(_type == "F35B") then 
		{
			_weapons = weapons _vec;
			if(("SidewinderLaucher_F35" in _weapons)) then {_vec removeweapon "SidewinderLaucher_F35"; _vec removeMagazine "2Rnd_Sidewinder_F35"};
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";

			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
		};	
		if(_type == "AV8B") then 
		{
			_weapons = weapons _vec;
			if(not ("MaverickLauncher" in _weapons)) then {_vec addweapon "MaverickLauncher"};
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			if(not ("57mmLauncher" in _weapons)) then {_vec addweapon "57mmLauncher"};
			_vec removeMagazine "192Rnd_57mm";
			_vec addMagazine "192Rnd_57mm";
		};			
		if(_type == "AV8B2") then 
		{
			_weapons = weapons _vec;
			if(not ("HellfireLauncher" in _weapons)) then {_vec addweapon "HellfireLauncher"};
			_vec removeMagazine "8Rnd_Hellfire";
			_vec addMagazine "8Rnd_Hellfire";
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
		};
		if(_type == "MH60S") then 
		{
			_weapons = weapons _vec;
			if(not ("GAU12" in _weapons)) then {_vec addweapon "GAU12"};
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
		};			
		if(_type == "UH1Y") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
		};			

		if(_type == "MV22") then 
		{
			_weapons = weapons _vec;
			if(not ("HellfireLauncher" in _weapons)) then {_vec addweapon "HellfireLauncher"};
			_vec removeMagazine "8Rnd_Hellfire";
			_vec addMagazine "8Rnd_Hellfire";
			if(not ("GAU12" in _weapons)) then {_vec addweapon "GAU12"};
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
/*
			if(not ("HeliBombLauncher" in _weapons)) then {_vec addweapon "HeliBombLauncher"};
			_vec removeMagazine "2Rnd_FAB_250";
			_vec addMagazine "2Rnd_FAB_250";
*/
			if(not ("AirBombLauncher" in _weapons)) then {_vec addweapon "AirBombLauncher"};
			_vec removeMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			if(not ("FFARLauncher" in _weapons)) then {_vec addweapon "FFARLauncher"};
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";

		};		
		if(_type == "C130J") then 
		{
			_weapons = weapons _vec;
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";

			if(not ("GSh302" in _weapons)) then {_vec addweapon "GSh302"};
			_vec removeMagazine "750Rnd_30mm_GSh301";
			_vec removeMagazine "750Rnd_30mm_GSh301";
			_vec removeMagazine "750Rnd_30mm_GSh301";
			_vec addMagazine "750Rnd_30mm_GSh301";
			_vec addMagazine "750Rnd_30mm_GSh301";
			_vec addMagazine "750Rnd_30mm_GSh301";
			if(not ("AirBombLauncher" in _weapons)) then {_vec addweapon "AirBombLauncher"};
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			if(not ("BombLauncher" in _weapons)) then {_vec addweapon "BombLauncher"};
			_vec removeMagazine "6Rnd_GBU12_AV8B";
			_vec removeMagazine "6Rnd_GBU12_AV8B";
			_vec removeMagazine "6Rnd_GBU12_AV8B";
			_vec addMagazine "6Rnd_GBU12_AV8B";
			_vec addMagazine "6Rnd_GBU12_AV8B";
			_vec addMagazine "6Rnd_GBU12_AV8B";
			if(not ("S8Launcher" in _weapons)) then {_vec addweapon "S8Launcher"};
			_vec removeMagazine "80Rnd_80mm";
			_vec removeMagazine "80Rnd_80mm";
			_vec removeMagazine "80Rnd_80mm";
			_vec addMagazine "80Rnd_80mm";
			_vec addMagazine "80Rnd_80mm";
			_vec addMagazine "80Rnd_80mm";
			if(not ("VikhrLauncher" in _weapons)) then {_vec addweapon "VikhrLauncher"};
			_vec removeMagazine "12Rnd_Vikhr_KA50";
			_vec removeMagazine "12Rnd_Vikhr_KA50";
			_vec addMagazine "12Rnd_Vikhr_KA50";
			_vec addMagazine "12Rnd_Vikhr_KA50";
		};			
		if(_type == "AH64D") then 
		{
			_weapons = weapons _vec;
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
		};	
		if(_type == "AH64D_Sidewinders") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			if(not ("AirBombLauncher" in _weapons)) then {_vec addweapon "AirBombLauncher"};
			_vec removeMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";

		};	

	};
};
};

try the mission here: http://91.192.210.5/gits/Arma/

Share this post


Link to post
Share on other sites

Cool this was helpful, I've changed the loadout on the FDF F-18C and made it AG capable. :)

Edited by SGT M

Share this post


Link to post
Share on other sites

i've just come across this thread, and am wondering how i can get a lock on missiles like the ch29 on a C130J,so that the home in on ground targets, at the moment its a dud lock and doesnt home, any ideas on what i need to do to fix this?

Edited by subaruscott

Share this post


Link to post
Share on other sites
I have custom loadouts working in evolution for almost all planes and choppers - see code below for some ideas. The new AH64d_Sidewinders vehicle has an 8 sidewinder magazine that I'm well up for putting ont othe F35 now, instead of 2x4 which it has atm.

BIS_EVO_Repair = 
{
_vec = (vehicle player);
_type = typeOf vehicle player;
if(getDammage _vec > 0 or fuel _vec < 0.98 and not (_vec isKindOf "Man")) then
{
	_inrepairzone = ((_vec in list AirportIn) or (_vec in list farp1) or (_vec in list farp2) or (_vec in list farp3) or (_vec in list reng1) or (_vec in list reng2) or (_vec in list reng3) or (_vec in list reng4) or (_vec in list dock1) or (_vec in list dock2));
	if(((_vec in list AirportIn) or (_vec in list farp1) or (_vec in list farp2) or (_vec in list farp3) or (_vec in list reng1) or (_vec in list reng2) or (_vec in list reng3) or (_vec in list reng4) or (_vec in list dock1) or (_vec in list dock2)) and _vec != player and speed _vec > -2 and speed _vec < 2 and position _vec select 2 < 2.0 and (local _vec)) then
	{

		 titleText [localize "STR_M04t83", "PLAIN DOWN",0.3];
		 for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do
		 {
		    sleep 0.200;	    		    
		    if (getDammage _vec > 0) then {_vec setDammage ((getDammage _vec)-0.0125);};
		    if (Fuel _vec < 1) then {_vec setFuel ((Fuel _vec)+0.0125);};
		    if (getDammage _vec == 0 and Fuel _vec == 1) then {_loop2=1;};
		    if(_vec != vehicle player or speed _vec < -2 or speed _vec > 2 or position _vec select 2 > 2.0) then {_loop2=1;titleText [localize "STR_M04t84", "PLAIN DOWN",0.3];};
		    _dam = (getDammage _vec)*100;
		    _ful = (Fuel _vec)*100;
		    hint format["Damage: %1\nFuel: %2",Round _dam,Round _ful];
		};
		_vec setVehicleAmmo 1;	
//adding cheats to planes
		if(_type == "A10") then 
		{
			_weapons = weapons _vec;
			if(not ("Mk82BombLauncher_6" in _weapons)) then {_vec addweapon "Mk82BombLauncher_6"};
			_vec removeMagazine "6Rnd_Mk82";
			_vec addMagazine "6Rnd_Mk82";
			_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";
			if(not ("FFARLauncher" in _weapons)) then {_vec addweapon "FFARLauncher"};
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
		};

		if(_type == "F35B") then 
		{
			_weapons = weapons _vec;
			if(("SidewinderLaucher_F35" in _weapons)) then {_vec removeweapon "SidewinderLaucher_F35"; _vec removeMagazine "2Rnd_Sidewinder_F35"};
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";

			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
		};	
		if(_type == "AV8B") then 
		{
			_weapons = weapons _vec;
			if(not ("MaverickLauncher" in _weapons)) then {_vec addweapon "MaverickLauncher"};
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec removeMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			_vec addMagazine "2Rnd_Maverick_A10";
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			if(not ("57mmLauncher" in _weapons)) then {_vec addweapon "57mmLauncher"};
			_vec removeMagazine "192Rnd_57mm";
			_vec addMagazine "192Rnd_57mm";
		};			
		if(_type == "AV8B2") then 
		{
			_weapons = weapons _vec;
			if(not ("HellfireLauncher" in _weapons)) then {_vec addweapon "HellfireLauncher"};
			_vec removeMagazine "8Rnd_Hellfire";
			_vec addMagazine "8Rnd_Hellfire";
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
		};
		if(_type == "MH60S") then 
		{
			_weapons = weapons _vec;
			if(not ("GAU12" in _weapons)) then {_vec addweapon "GAU12"};
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
		};			
		if(_type == "UH1Y") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec removeMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
			_vec addMagazine "14Rnd_FFAR";
		};			

		if(_type == "MV22") then 
		{
			_weapons = weapons _vec;
			if(not ("HellfireLauncher" in _weapons)) then {_vec addweapon "HellfireLauncher"};
			_vec removeMagazine "8Rnd_Hellfire";
			_vec addMagazine "8Rnd_Hellfire";
			if(not ("GAU12" in _weapons)) then {_vec addweapon "GAU12"};
			_vec removeMagazine "300Rnd_25mm_GAU12";
			_vec addMagazine "300Rnd_25mm_GAU12";
/*
			if(not ("HeliBombLauncher" in _weapons)) then {_vec addweapon "HeliBombLauncher"};
			_vec removeMagazine "2Rnd_FAB_250";
			_vec addMagazine "2Rnd_FAB_250";
*/
			if(not ("AirBombLauncher" in _weapons)) then {_vec addweapon "AirBombLauncher"};
			_vec removeMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			if(not ("FFARLauncher" in _weapons)) then {_vec addweapon "FFARLauncher"};
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";

		};		
		if(_type == "C130J") then 
		{
			_weapons = weapons _vec;
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";

			if(not ("GSh302" in _weapons)) then {_vec addweapon "GSh302"};
			_vec removeMagazine "750Rnd_30mm_GSh301";
			_vec removeMagazine "750Rnd_30mm_GSh301";
			_vec removeMagazine "750Rnd_30mm_GSh301";
			_vec addMagazine "750Rnd_30mm_GSh301";
			_vec addMagazine "750Rnd_30mm_GSh301";
			_vec addMagazine "750Rnd_30mm_GSh301";
			if(not ("AirBombLauncher" in _weapons)) then {_vec addweapon "AirBombLauncher"};
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec removeMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";
			if(not ("BombLauncher" in _weapons)) then {_vec addweapon "BombLauncher"};
			_vec removeMagazine "6Rnd_GBU12_AV8B";
			_vec removeMagazine "6Rnd_GBU12_AV8B";
			_vec removeMagazine "6Rnd_GBU12_AV8B";
			_vec addMagazine "6Rnd_GBU12_AV8B";
			_vec addMagazine "6Rnd_GBU12_AV8B";
			_vec addMagazine "6Rnd_GBU12_AV8B";
			if(not ("S8Launcher" in _weapons)) then {_vec addweapon "S8Launcher"};
			_vec removeMagazine "80Rnd_80mm";
			_vec removeMagazine "80Rnd_80mm";
			_vec removeMagazine "80Rnd_80mm";
			_vec addMagazine "80Rnd_80mm";
			_vec addMagazine "80Rnd_80mm";
			_vec addMagazine "80Rnd_80mm";
			if(not ("VikhrLauncher" in _weapons)) then {_vec addweapon "VikhrLauncher"};
			_vec removeMagazine "12Rnd_Vikhr_KA50";
			_vec removeMagazine "12Rnd_Vikhr_KA50";
			_vec addMagazine "12Rnd_Vikhr_KA50";
			_vec addMagazine "12Rnd_Vikhr_KA50";
		};			
		if(_type == "AH64D") then 
		{
			_weapons = weapons _vec;
			if(not ("SidewinderLaucher" in _weapons)) then {_vec addweapon "SidewinderLaucher"};
			_vec removeMagazine "4Rnd_Sidewinder_AV8B";
			_vec addMagazine "4Rnd_Sidewinder_AV8B";
		};	
		if(_type == "AH64D_Sidewinders") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec removeMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			_vec addMagazine "38Rnd_FFAR";
			if(not ("AirBombLauncher" in _weapons)) then {_vec addweapon "AirBombLauncher"};
			_vec removeMagazine "4Rnd_FAB_250";
			_vec addMagazine "4Rnd_FAB_250";

		};	

	};
};
};

try the mission here: http://91.192.210.5/gits/Arma/

How do I get this script to work, do I use a trigger, an Object, ??

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  

×