Jump to content
Sign in to follow this  
On_Sabbatical

Adding flares to "UH1Y"

Recommended Posts

Hi,

I tried adding flares to UH1Y,but it's not working using addweapon and addmagzine or addmagazineturret ... anyone has done it before that can help ?

Thanks !

Share this post


Link to post
Share on other sites

I've only seen it work with scripts or by changing the cfg. or using the TGW vehicle fixes addon.

Edited by Beagle

Share this post


Link to post
Share on other sites

Config.cpp

class CfgPatches
{
class GNT_AddFlares
{
units[] = {};
weapons[] = {};
requiredVersion = 1.00;
requiredAddons[] = {"CAAir2_UH1Y"};
};
};

class CfgVehicles
{
class UH1Y;
class UH1Y_f: UH1Y
{
	displayName = "UH-1Y - Flares";
	memoryPointCM[] = {"pos codriver dir","pos cargo dir"};
	memoryPointCMDir[] = {"pos codriver","pos cargo"};
	weapons[] = {"FFARLauncher_14","CMFlareLauncher"};
	magazines[] = {"14Rnd_FFAR","60Rnd_CMFlareMagazine"};
	radarType = 4;
	LockDetectionSystem = 8;
	IncommingMisslieDetectionSystem = 16;
};
};

Share this post


Link to post
Share on other sites

Thanks, but it would be better if it worked with previous commands to have in the mission :D without mods

Share this post


Link to post
Share on other sites

scripting it in you could use:


	class Item46
	{
		position[]={3613.2358,6.2217202,2152.1208};
		azimut=5;
		id=51;
		side="EMPTY";
		vehicle="UH1Y";
		skill=0.60000002;
		init="_this addMagazine ""120Rnd_CMFlare_Chaff_Magazine"";_this addweapon ""CMFlareLauncher"";";
//or something like this 			init="this addMagazineTurret [""120Rnd_CMFlare_Chaff_Magazine"",[0]];this addWeaponTurret [""CMFlareLauncher"",[0]];";
	};

add weaponturret doesn't exist so you may need to fiddle with this a bit to find out the correct turret then add the weapon

you may need to figure out the correct turret to add the weapon and mag to

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

we use this script called on the client:

	 for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do
	 {
		_vec = (vehicle player);
		_type = typeOf vehicle player;
		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"};
			_vec removeMagazine "6Rnd_Grenade_Camel";
			_vec removeMagazine "6Rnd_Grenade_Camel";
			_vec addMagazine "6Rnd_Grenade_Camel";
			_vec addMagazine "6Rnd_Grenade_Camel";
			if(not ("CamelGrenades" in _weapons)) then {_vec addweapon "CamelGrenades"};
			_vec removeMagazine "LaserBatteries";
			_vec addMagazine "LaserBatteries";
			if(not ("LaserDesignator_mounted" in _weapons)) then {_vec addweapon "LaserDesignator_mounted"};
			_vec removeMagazine "120Rnd_CMFlare_Chaff_Magazine";
			_vec addMagazine "120Rnd_CMFlare_Chaff_Magazine";
			if(not ("CMFlareLauncher" in _weapons)) then {_vec addweapon "CMFlareLauncher"};
		};	
	};

Share this post


Link to post
Share on other sites

I don't think you can unless scripting it. I know you can use the addweapon, addmagazine, addmagazineturret on the Littlebird variatns that dont have the Flares. but i dont think it works on the Huey

Share this post


Link to post
Share on other sites

just checked and the crew chief gets them if you put them in with this init line

they work fine but obviously not as the pilot - manual fire takes over the door gunner turret, not the chief!

this addMagazine "120Rnd_CMFlare_Chaff_Magazine";this addweapon "CMFlareLauncher";
this addMagazineTurret ["14Rnd_FFAR",[-1]];this addMagazineTurret ["120Rnd_CMFlare_Chaff_Magazine",[-1]];this addweapon "CMFlareLauncher";

this line adds hydras to the pilot (in turret -1)

but i can't work out how to add the weapon to the pilot turret and not the default gunner turret...

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  

×