Jump to content
Sign in to follow this  
tigerforce

Air Bomber addon available with SSM or other

Recommended Posts

Hi,

I am a member of the french team OFrP, and i am here to ask you about a bit problem that we encounter.

In our mod, we have aircrafts (fighter and bomber) as the Mirage 2000 or Rafale, equipped with GBU 12 and bomb launchers.

So the question is, what we have to put in the config of the bomber plane, to make AI pilot bomb a target, and available to strike with the SSM module ?

Because, currently the plane with AI pilot do not bomb neither a lasertarget nor with SSM module.

Thank by advance,

Regards,

TigerForce

Share this post


Link to post
Share on other sites
...AI pilot do not bomb neither a lasertarget...

That's odd, AI should always attack a lasertarget. Sorry for dumb question: does the plane has a laserscanner? Does it work outside SSM, in editor, player lases a target and the AI pilot does attack it?

Share this post


Link to post
Share on other sites

So i have checked the config file of the aircraft and the laserscanner is already on true and in the ammo config the laserlock is also on true.

To answer your question, AI do not open fire when player lases a target. Nevertheless, when i am the pilot and i order the gunner to lock and open fire on a target, it executes my order. Perhaps, the AI pilot, does not order automaticaly its AI gunner to lock lasertarget ?

I think the problem could also come from the fact that in BIS plane there is just one pilot who is also a gunner.

But with French Mirage 2000 D aircraft, we have two crewmen, one pilot and one gunner. Maybe the problem come from here.

So the question is, can you help us ? :)

Thank by advance

Share this post


Link to post
Share on other sites

Hi guys,

i think i have found a part of the answer.

The French Mirage 2000D with its two crewmen does not engage lasertarget nor drop bomb with Simple Support Module, because BIS hasn't work to let this type of aircraft to drop bomb.

In fact, the lone BIS aircrafts with two crewmen is the SU-34 which hasn't any bomb and so, can't be used with SSM module.

But even if, this type of aircraft with two crewmen can't engage lasertarget, Rafale M with only one pilot can do it. So it signifies that if we want to have our bipilots aircrafts availabe to attack laser, we have to place the gunner as commander, and the pilot under his orders.

Is it possible with ArmA 2 OA ?

The last question is, why the Simple Support Module doesn't drop our bomb when it only drops the ones of the BIS aircrafts ? What is different ?

Share this post


Link to post
Share on other sites

Just double checked. My B52 with a Pilot and a Gunner works fine.

1. place an empty AI B52

2. In INIT use;

this addMagazine "6Rnd_GBU12_AV8B"; this addWeapon "BombLauncher";

3. place an AI spotter with Laser, place a couple of AI T72's. Watch the action

Also, tried it as a human gunner in the B52. Works fine.

Is it because my Gunner controls an invisible turret?

CONFIG

// GNATs B52 v4
// Dec 2011
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

class CfgPatches
{
class GNT_B52
       {
	units[] = {GNTB52,GNTB52m,GNTB52u};
	requiredVersion = 1.00;
	requiredAddons[] = {"GLT_Missilebox","Extended_Eventhandlers"};
};

};

class Extended_Init_EventHandlers {
class GNTB52 {
	GNTB52_init = "_gntscr = [_this select 0] execvm ""\GNT_B52\scr\init1.sqf""; _gntscr = _this execVM ""\ca\Data\ParticleEffects\SCRIPTS\init.sqf"";";
};
class GNTB52m {
	GNTB52m_init = "_gntscr = [_this select 0] execvm ""\GNT_B52\scr\init1.sqf""; _gntscr = _this execVM ""\ca\Data\ParticleEffects\SCRIPTS\init.sqf"";";
};
class GNTB52u {
	GNTB52u_init = "_gntscr = [_this select 0] execvm ""\GNT_B52\scr\init1.sqf""; _gntscr = _this execVM ""\ca\Data\ParticleEffects\SCRIPTS\init.sqf"";";
};
};
class Extended_Fired_Eventhandlers {
class GNTB52 {
	GNTB52_fired = "[_this] execvm ""\GNT_B52\scr\firedC.sqf""";
};
class GNTB52m {
	GNTB52m_fired = "[_this] execvm ""\GNT_B52\scr\firedC.sqf""";
};
class GNTB52u {
	GNTB52u_fired = "[_this] execvm ""\GNT_B52\scr\firedC.sqf""";
};
};

class Extended_Killed_Eventhandlers {
class GNTB52 {
	GNTB52_killed = "_this call BIS_Effects_EH_Killed;";
};
class GNTB52m {
	GNTB52m_killed = "_this call BIS_Effects_EH_Killed;";
};
class GNTB52u {
	GNTB52u_killed = "_this call BIS_Effects_EH_Killed;";
};

};
class cfgMagazines {
class GLT_2Rnd_MK82;
class GLT_2Rnd_MK84;
class GLT_51Rnd_MK82 : GLT_2Rnd_MK82 {
	count = 51;
};
class GLT_18Rnd_MK84 : GLT_2Rnd_MK84 {
	count = 18;
};
};

class cfgWeapons {
class GLT_MK82_Launcher;
class GLT_MK84_Launcher;
class GLT_MK82_Launcher_B52 : GLT_MK82_Launcher {
	scope = 2;
	displayName = "Mk-82";
	magazines[] = {"GLT_2Rnd_MK82", "GLT_4Rnd_MK82", "GLT_6Rnd_MK82", "GLT_8Rnd_MK82", "GLT_10Rnd_MK82", "GLT_12Rnd_MK82", "GLT_51Rnd_MK82"};
	burst=6;
	multiplier=1;
};
class GLT_MK84_Launcher_B52 : GLT_MK84_Launcher {
	scope = 2;
	displayName = "Mk-84";
	magazines[] = {"GLT_2Rnd_MK84", "GLT_4Rnd_MK84", "GLT_6Rnd_MK84", "GLT_18Rnd_MK84"};
	burst=2;
	multiplier=1;
};
};
class CfgVehicles
{
class Plane;
class PlaneWreck;
class Su34 : Plane {
	class viewpilot;
	class viewgunner;
	class Turrets;
	class NewTurret;	// External class reference
	class AnimationSources;	// External class reference
};
class GNTB52Wreck: PlaneWreck
{
	scope = 1;
	class Armory
	{
		disabled = 1;
	};
	model = "\GNT_B52\GNTB52_wreck.p3d";
	typicalCargo[] = {};
	irTarget = 0;
	transportAmmo = 0;
	transportRepair = 0;
	transportFuel = 0;
	transportSoldier = 1;
	class Eventhandlers {};
};	
class GNTB52: Su34 // GNTXPlane
{
	scope = public;
	mapSize = 65;
	side = 1;
	damageEffect = "DamageSmokePlane";		
	destrType = "DestructWreck";
	armor = 200;
	cost = 1000000;
	crew = USMC_Soldier_Pilot;
	faction = "USMC";
	hiddenselections[] ={"skin1","skin2","num1","num2","num3","num4"};
	accuracy=.05;
	irScanRangeMin = 1000;
	irScanRangeMax = 10000;
	irScanToEyeFactor = 5;
	irScanGround = 1;
	driverAction="C130_Pilot";
	gunnerAction="C130_Pilot";
	cargoAction[]={"C130_Cargo","C130_Cargo"};
	insideSoundCoef=0.30000;
	getInAction = "GetInHigh";
	getOutAction = "GetOutHigh";
	soundGetIn[] = {"ca\sounds\Air\C130\close",0.316228,1};
	soundGetOut[] = {"ca\sounds\Air\C130\open",0.316228,1,40};
	transportSoldier=1;
	radarType = 4;
	LockDetectionSystem = 8;
	IncommingMisslieDetectionSystem = 16;
	driverhasflares =true;
	weapons[] = {"CMFlareLauncher"};
	magazines[] = {"120Rnd_CMFlare_Chaff_Magazine"};
	memoryPointCM[] = {"cmstart1","cmstart2"};
 		memoryPointCMDir[] = {"cmdir1","cmdir2"};
	soundLocked[] = {"\ca\Tracked\Data\Sound\alarm_loop1", 0.000316228, 2};
	soundIncommingMissile[] = {"\ca\Tracked\Data\Sound\alarm_loop1", 0.000316228, 4};

	class Reflectors  {
		class Left  {
			color[] = {0.800000,0.800000,1.000000,1.000000 };
			ambient[] = {0.070000,0.070000,0.070000,1.000000 };
			position = "L svetlo";
			direction = "konec L svetla";
			hitpoint = "L svetlo";
			selection = "L svetlo";
			size = 2;
			brightness = 3.000000;
		};

		class Right  {
			color[] = {0.800000,0.800000,1.000000,1.000000 };
			ambient[] = {0.070000,0.070000,0.070000,1.000000 };
			position = "P svetlo";
			direction = "konec P svetla";
			hitpoint = "P svetlo";
			selection = "P svetlo";
			size = 2;
			brightness = 3.000000;
		};
	};	
	gunAimDown = 0.145;
	maxSpeed=660;
//		wheelCircumference = 4.712;
	soundEngine[]={\GNT_B52\snd\engine.wav,db-10,1};
	displayName="B-52 Buff MK82";
	nameSound="plane";
	model=\GNT_B52\GNTB52_1;
	audible=1.3;
	picture=\GNT_B52\B52pic.paa;
	icon=\GNT_B52\B52icon.paa;

	formationX=180;
	formationZ=180;

	fov=0.5;
	precision=350;
	aileronSensitivity = 1.0;  //0.5;
	elevatorSensitivity = 1.1;
	wheelSteeringSensitivity = 4.2;
	ejectSpeed[]={0,40,0};
	envelope[] = {0.000000,0.100000,0.800000,2.000000,2.200000,2.800000,3.55000,3.5500,3.55000,3.55000,2.600000,0.800000,1.000 };
	landingAoa = "5.5*3.1415/180";
	landingSpeed = 195;
	brakeDistance=950;

	flapsFrictionCoef = 2;		//2
	extCameraPosition[]={0,12,-115};

	class AnimationSources
	{
		class  leftbombbay // Should be the same as your selection name.
		{
			source = "user"; //The controller is defined as a user animation.
			animPeriod = 4;  //The animation period used for this controller.
			initPhase=0;     //Initial phase when object is created. 0 = CLOSED
		};
		class  rightbombbay // Should be the same as your selection name.
		{
			source = "user"; //The controller is defined as a user animation.
			animPeriod = 4;  //The animation period used for this controller.
			initPhase=0;     //Initial phase when object is created. 0 = CLOSED
		};
		class  Bomb1 // Should be the same as your selection name.
		{
			source = "user";
			animPeriod = 0.01;
			initPhase=0; 
		};
	};

class Turrets
   {
     class MainTurret : NewTurret
     {
       minElev = -90;
       maxElev = 38.2;
       initElev = -45;
       minTurn = -180;
       maxTurn = 180;
       initTurn = 0;
       maxHorizontalRotSpeed = 1.2;
       maxVerticalRotSpeed = 1.2;
	stabilizedInAxes = "StabilizedInAxesBoth";
       startEngine = 0;
       body = "mainturret";
       gun = "maingun";
       animationSourceBody = "mainturret";
       animationSourceGun = "maingun";
	weapons[]={"GLT_MK82_Launcher_B52"};
	magazines[]={"GLT_51Rnd_MK82"};
       class Viewoptics
       {
				minAngleX = -360;
				maxAngleX = 360;
				initAngleX = 0;
				minAngleY = -360;
				maxAngleY = 360;
				initAngleY = 0;
				initFov = 0.7;
				minFov = 0.3;
				maxFov = 1.2;
       };
       soundServo[] = {"",0.01,1};
       outGunnerMayFire = 1;
	commanding = -1;
       gunBeg = "S_start";
       gunEnd = "S_end";
       memoryPointGunnerOptics = "gunner1";
       selectionFireAnim = "";
       castGunnerShadow = 0;
       viewGunnerShadow = 0;
       gunnerOpticsModel = "\ca\air\optika_AH1Z";
       gunnerForceOptics = 0;
     };
   };		


	class UserActions
	{
		class luki1
		{
//				displayName="Open Bomb Bay";
			displayName = "$STR_GNT_B52_OB";
			position="gunnerview";
			onlyforplayer=0;
			radius=8;
			condition="(player in this)and(this animationPhase ""LeftBombbay"" == 0)"; 
			statement="this animate [""LeftBombbay"",1];this animate [""RightBombbay"",1];";
		};
		class luki2
		{
//				displayName="Close Bomb Bay";
			displayName = "$STR_GNT_B52_CB";
			position="gunnerview";
			onlyforplayer=0;
			radius=8;
			condition="(player in this)and(this animationPhase ""LeftBombbay"" == 1)";
			statement="this animate [""LeftBombbay"",0];this animate [""RightBombbay"",0];";
		};
		class targ1
		{
//				displayName="Move assign";
			displayName = "$STR_GNT_B52_MA";
			position="gunnerview";
			onlyforplayer=0;
			radius=8;
			condition="(player in this)";
			statement="this doMove (screenToWorld [0.5,0.5]);";
		};
	};
};

class GNTB52m: GNTB52
{
	displayName="B-52 Buff MK84";
	weapons[] = {"CMFlareLauncher"};
	magazines[] = {"120Rnd_CMFlare_Chaff_Magazine"};
	model=\GNT_B52\GNTB52_2;
	class Turrets
	{
	  class MainTurret : NewTurret
	  {
		minElev = -90;
		maxElev = 38.2;
		initElev = -45;
		minTurn = -180;
		maxTurn = 180;
		initTurn = 0;
		maxHorizontalRotSpeed = 1.2;
		maxVerticalRotSpeed = 1.2;
		stabilizedInAxes = "StabilizedInAxesBoth";
		startEngine = 0;
		body = "mainturret";
		gun = "maingun";
		animationSourceBody = "mainturret";
		animationSourceGun = "maingun";
		weapons[]={"GLT_MK84_Launcher_B52"};
		magazines[]={"GLT_18Rnd_MK84"};
		class Viewoptics
		{
					minAngleX = -360;
					maxAngleX = 360;
					initAngleX = 0;
					minAngleY = -360;
					maxAngleY = 360;
					initAngleY = 0;
					initFov = 0.7;
					minFov = 0.3;
					maxFov = 1.2;
		};
		soundServo[] = {"",0.01,1};
		outGunnerMayFire = 1;
		commanding = -1;
		gunBeg = "S_start";
		gunEnd = "S_end";
		memoryPointGunnerOptics = "gunner1";
		selectionFireAnim = "";
		castGunnerShadow = 0;
		viewGunnerShadow = 0;
		gunnerOpticsModel = "\ca\air\optika_AH1Z";
		gunnerForceOptics = 0;
	  };
	};
};

class GNTB52u: GNTB52
{
	displayName="B-52 Buff";
	weapons[] = {"CMFlareLauncher"};
	magazines[] = {"120Rnd_CMFlare_Chaff_Magazine"};
	model=\GNT_B52\GNTB52_u;
	class Turrets
	{
	  class MainTurret : NewTurret
	  {
		minElev = -90;
		maxElev = 38.2;
		initElev = -45;
		minTurn = -180;
		maxTurn = 180;
		initTurn = 0;
		maxHorizontalRotSpeed = 1.2;
		maxVerticalRotSpeed = 1.2;
		stabilizedInAxes = "StabilizedInAxesBoth";
		startEngine = 0;
		body = "mainturret";
		gun = "maingun";
		animationSourceBody = "mainturret";
		animationSourceGun = "maingun";
		weapons[]={};
		magazines[]={};
		class Viewoptics
		{
					minAngleX = -360;
					maxAngleX = 360;
					initAngleX = 0;
					minAngleY = -360;
					maxAngleY = 360;
					initAngleY = 0;
					initFov = 0.7;
					minFov = 0.3;
					maxFov = 1.2;
		};
		soundServo[] = {"",0.01,1};
		outGunnerMayFire = 1;
		commanding = -1;
		gunBeg = "S_start";
		gunEnd = "S_end";
		memoryPointGunnerOptics = "gunner1";
		selectionFireAnim = "";
		castGunnerShadow = 0;
		viewGunnerShadow = 0;
		gunnerOpticsModel = "\ca\air\optika_AH1Z";
		gunnerForceOptics = 0;
	  };
	};
};
};

Share this post


Link to post
Share on other sites

Hi [APS]Gnat,

Thank for your quick response, i checked your config file to compare it with mine, but it seems there is no massive difference.

But i think its probably the "ViewPilot" which more important in your config than in mine. I will test it as soon as posible, and post a feedback.

Nevertheless, Is your B52 availabe to bomb automaticly a target with the Simple Support Module (without a laser target) ?

Share this post


Link to post
Share on other sites

Haven't used Simple Support Module, so can't say.

EDIT : Tried it, doesn't work.

WHY:

Doesn't work with 2 crew aircraft because the BIS script only spawns a Pilot in the plane. No gunner.

Only way around this might be to create a new support module for 2 Crew aircraft.

(FYI .... doesn't matter what your aircraft is normally armed with, the BIS module re-arms it; addMagazine "4Rnd_GBU12";)

MAYBE SOLUTION

CUSTOMISE your aircraft with a new spawn script.

- Wait 5 seconds (from spawning)

- If aircraft is now found to be armed with weapon "BombLauncherA10"

--- Check gunner not present but pilot is

--- Spawn a gunner to the pilots group

--- move him into gunner seat

FYI

This is the airstrike script of the SSM module

	BIS_SSM_fnc_SpawnAircraft =
	{
		private ["_var","_val","_caller","_act","_requestPos","_spawnPos","_pilot","_class","_vehicle","_disp","_rvx","_rvy","_wp","_target"];
		// First of all, free the channel (in Multiplayer)
		// first argument, _this select 0 is the Publicvariable (string)			
		_var = _this select 0;
		missionnamespace setVariable [_var,objNull];	

		// _caller reaquested the supply drop
		_caller = _this select 1;
		//type of action (string)
		_act = _this select 2; 

		_requestPos = _caller getVariable "BIS_SSM_RequestPos";
		_spawnPos = _this call BIS_SSM_fnc_GetFlyInPosition;

		// create the vehicle and the pilot
		_pilot = ObjNull;
		_class = missionnamespace getVariable ("BIS_SSM_PILOT_" + (str side _caller));
		_class createUnit [_spawnPos, createGroup side _caller, "_pilot = this",0.8];

		_class = missionnamespace getVariable ("BIS_SSM_" + _act + "_VEHICLE_" + (str side _caller));
		_vehicle = createVehicle [_class, _spawnPos, [], 0, "FLY"];		

		_disp = missionnamespace getVariable ("BIS_SSM_Airstrike_DISPERSION_"+(str side _caller));

		_pilot moveInDriver _vehicle;

		_varString = format ["BIS_SSM_%1_FIRED", _vehicle];
		missionnamespace setVariable [_varString, false];

		// randomise Velocity, direction
		_rvx = 100 - random 200;
		_rvy = 100 - random 200;
		_vehicle setVelocity [_rvx,_rvy,0]; 
		_vehicle setDir (_rvx atan2 _rvy);
		_vehicle setPos [_spawnPos select 0, _spawnPos select 1, BIS_SSM_FLYINHEIGHT];
		_vehicle FlyInHeight BIS_SSM_FLYINHEIGHT;

		// Call Mission Designers Code
		_var = "BIS_SSM_"+_act+"_VEHICLEINIT";
		_val = missionnamespace getVariable _var;
		if (not isNil _val) then {_vehicle call _val;};

		if (_act == "Airstrike") then 
		{				

			// If the caller does have a laser designator, then there is no need for the default drop
			if (BIS_SSM_LASERDESIGNATORCLASS in weapons _caller) then 
			{ 
				// Laser Designated
				{
					_vehicle removeMagazine _x;
				} forEach (magazines _vehicle);
				{
					_vehicle removeWeapon _x;
				} forEach (weapons _vehicle);
				_vehicle addMagazine "4Rnd_GBU12";
				_vehicle addWeapon "BombLauncherA10";
			}
			else
			{
				_class = BIS_SSM_AIRSTRIKETARGETCLASS_WEST;
				if (side _caller != WEST) then
				{
					_class = BIS_SSM_AIRSTRIKETARGETCLASS_EAST;
				};
				_target = objNull;

				{
					_vehicle removeMagazine _x;
				} forEach (magazines _vehicle);
				{
					_vehicle removeWeapon _x;
				} forEach (weapons _vehicle);
				_vehicle addMagazine "4Rnd_GBU12";
				_vehicle addWeapon "BombLauncherA10";

				_target = _class createvehicle _requestPos;
				_target setPos [_requestPos select 0,_requestPos select 1, 0.1];
				_target hideObject true;
				_radius = 0;
				_checkUnits = (nearestObjects [_target, ["All"], 100]);
				_checkUnits = _checkUnits - [_target];
				_newHeight = 0;
				_height = ((getPosASL _target) select 2);
				{
					_radius = ((_x call BIS_fnc_BoundingCircle) / 2) + 1;
					if (_target distance _x <= _radius) then
					{
						_newHeight = ((boundingCenter _x) select 2) + (((boundingBox _x) select 1) select 2) + ((getPosASL _x) select 2);
						if (_newHeight > _height) then
						{
							_height = _newHeight;
						};
					};
				} forEach _checkUnits;
				_target setPosASL [_requestPos select 0,_requestPos select 1, (_height + 0.1)];

				_wp = (group _pilot) addWaypoint [_requestPos, 0];
				_wp setWaypointCompletionRadius 2000;

				[_target, _pilot] Spawn {
					_target = _this select 0;
					_pilot = _this select 1;
					while {!(isNull _target)} do {
						if (assignedTarget _pilot != _target) then {
							_pilot reveal _target;
							_pilot doTarget _target;
						};
						sleep 0.1;
					};
				};
				laserTarget _target;
				vehicle _pilot addEventHandler ["Fired",{ _this spawn BIS_SSM_AirstrikeEventFired; }];
			};

			BIS_SSM_AirstrikeEventFired = 
			{
				private ["_plane","_bomb","_target","_impact"];
				_plane = _this select 0;
				_varString = format ["BIS_SSM_%1_FIRED", _plane];
				_bomb = (nearestObjects [_this select 0, [], 10]) select 1;					
				_target = assignedTarget _plane;
				_impact = [0,0,0];
				_disp = missionnamespace getVariable ("BIS_SSM_Airstrike_DISPERSION_"+(str side driver _plane));

				while {not isNull _bomb} do { _impact = getPosATL _bomb; sleep 0.04;};

				//{deleteVehicle _x} forEach (nearestObjects [_impact, [bIS_SSM_AIRSTRIKETARGETCLASS_WEST,BIS_SSM_AIRSTRIKETARGETCLASS_EAST], 3 + _disp]);
				if ((_target isKindOf BIS_SSM_AIRSTRIKETARGETCLASS_WEST) || (_target isKindOf BIS_SSM_AIRSTRIKETARGETCLASS_EAST)) then
				{
					deleteVehicle _target;
				};
				driver _plane doTarget objNull;

				missionnamespace setVariable [_varString, true];
			};

			_varCondition = format ["(missionnamespace getVariable '%1') && true", _varString];

			// set 'fly out' final waypoint
			_wp = (group _pilot) addWaypoint [_this call BIS_SSM_fnc_GetFlyOutPosition, 0];
			_wp setWaypointStatements [_varCondition, "call BIS_SSM_fnc_FinalWaypointReached"];
		}
		else
		{
			// Units or Ammo Drop
			// Set Primary waypoint
			_wp = (group _pilot) addWaypoint [_requestPos, 0];
			_wp setWaypointbehaviour "STEALTH";

			// setWaypointStatement expression call cant have any arguments. We pass it with setVariable on the pilot object.
			_pilot setVariable ["BIS_SSM_SupportCaller",_caller];
			_wp setWaypointStatements ["true", "call BIS_SSM_fnc_"+_act+"WaypointReached"];

			// set 'fly out' final waypoint
			_wp = (group _pilot) addWaypoint [_this call BIS_SSM_fnc_GetFlyOutPosition, 0];
			_wp setWaypointStatements ["true", "call BIS_SSM_fnc_FinalWaypointReached"];	
		};

		_pilot
	};

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  

×