Jump to content
Sign in to follow this  
eggbeast

adding weapons and ammo to a TURRET

Recommended Posts

hiya

I'm looking for a way to add extra weapons to the pilot seat of a helicopter which has pilot weapons already but which has a door gunner position.

By default new weapons and ammo are added to the primarygunner, generally the first door gunner, so the pilot can only access these weapons by switching to manual fire.

However because he is overriding say an MG, he cannot lock on lockable weapons. I'd like to add weapons and mags to the pilot seat somehow... i'll give you some working examples below, and see how i think it could work - then if anyone has any input - do share! before i go trial and error on it for days.... cheers guys

ok this

http://community.bistudio.com/wiki/addMagazine

explains that

In turreted vehicles the magazine is added to the first turret with >> primaryGunner = 1; << set in the Vehicles turret config part (and the magazine is ONLY added to the very first turret if more than one is configged with >> primaryGunner = 1; << ).

I can do this:

//NOTE - all codes below rely on these two lines at the start
_vec = (vehicle player);
_type = typeOf vehicle player;

		if(_type == "F35B") then 
		{
			_weapons = weapons _vec;
			if(("SidewinderLaucher_F35" in _weapons)) then {_vec removeweapon "SidewinderLaucher_F35"; _vec removeMagazine "2Rnd_Sidewinder_F35"};
			_vec removeMagazine "8Rnd_Sidewinder_AH64";
			_vec addMagazine "8Rnd_Sidewinder_AH64";
			if(not ("SidewinderLaucher_AH64" in _weapons)) then {_vec addweapon "SidewinderLaucher_AH64"};

to add 8 sidewinders to the F35 - no problems.

and in a heli

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

to e.g. add 4 sidewinders to the hellfire-armed AH64.

now, this is all ok because the operator of the weapon has default locking ability right?

so with the MV22 which normally has no weapons I can do this

			if(_type == "MV22") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "8Rnd_Hellfire";
			_vec addMagazine "8Rnd_Hellfire";
			if(not ("HellfireLauncher" in _weapons)) then {_vec addweapon "HellfireLauncher"};

and the osprey pilot can lock targets with the hellfires and engage them.

now if i do this for the UH1Y venom, the pilot has to enable manual fire to get access to the bombs here:

			if(_type == "UH1Y") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "2Rnd_FAB_250";
			_vec addMagazine "2Rnd_FAB_250";
			if(not ("HeliBombLauncher" in _weapons)) then {_vec addweapon "HeliBombLauncher"};

He can lock these bombs onto target ok.

ok so here's the rub...

I want to put 2 harpoons onto a lynx which already ahs TOW's in the pilot turret and a door gunner with a Gimpie. I want the pilot to be able to lock them onto target and fire the harpoons. When I try this, the lock does not work

		if(_type == "rksl_lynx_ah7_4tow") then 
		{
			_weapons = weapons _vec;
			_vec removeMagazine "2Rnd_Harpoon_GLT";
			_vec addMagazine "2Rnd_Harpoon_GLT";
			if(not ("GLT_AGM84Launcher" in _weapons)) then {_vec addweapon "GLT_AGM84Launcher"};

ok, so i want to add the weapon and the magazine to the pilot turret, not to the primarygunner turret (gpmg)

can i do it like this?

_vec = (vehicle player);

_type = typeOf vehicle player;

_turret = getturret player; //i know i made this up - but is there a way to get the pilot turret?

if(_type == "rksl_lynx_ah7_4tow") then

{

_weapons = weapons _turret;

_turret removeMagazine "2Rnd_Harpoon_GLT";

_turret addMagazine "2Rnd_Harpoon_GLT";

if(not ("GLT_AGM84Launcher" in _weapons)) then {_turret addweapon "GLT_AGM84Launcher"};

the lynx primary turret and primary gunner is the pilot, but the weapons only go into the observer or gpmg gunner seat

anyone got an idea how to get the turret value for a players position in the vehicle and then use addweapon and addmagazine to place this in the turret instead of in just the vehicle...

Edited by eggbeast

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  

×