Jump to content
Sign in to follow this  
uzabit

Problem: Self-propelled howitzer engaging air targets with main gun.

Recommended Posts

Hi there,

 

i'm creating some addons for my own personal use to use with Arma 2 OA for a while now - I have recently begun to create an armored vehicle, in this case a 2S3 Akatsiya self-propelled howitzer for more immersion in my missions.

 

For the main gun I inherited the cfgammo, cfgmagazines and the cfgweapon entries of the BIS D-30 towed howitzer in my config.cpp.

 

For most parts I have the unit already working. What bothers me is that the howitzer now engages air targets, e.g. an AH-64, which the D-30 definitely does not. The similar MLRS or BM-21 Grad don't show this behavior. I checked unit cost and ammo cost settings for example, but what else does affect the target selection of units in Arma 2 OA? Can somebody help?

 

Here is my still very incomplete config.cpp:

 

class CfgPatches
{
	class 2S3_OA_config
	{
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"CAWeapons","Extended_EventHandlers"};
	};
};
class CfgAmmo
{
	class Sh_122_HE{};
	class Sh_152mm_HE: Sh_122_HE
	{
	cost=500;
	airLock = 0;
	};
};
class CfgMagazines
{
	class 30Rnd_122mmHE_D30{};
	class 46Rnd_152mmHE_D20: 30Rnd_122mmHE_D30
	{
	ammo = Sh_152mm_HE;
	count = 46;
	displayName="152mm HE";
	maxLeadSpeed = 0.3;
	};
};
class CfgWeapons
{
	class D30{};
	class D20: D30
	{
	displayName="152mm D-20 Howitzer";
	magazines[]={"46Rnd_152mmHE_D20"};
	};
};
class Turrets{};
class MainTurret{};
class CfgVehicles
{
	class Tank;
	class 2S3: Tank
	{
	side = 0;
	displayName="2S3";
	model = "\2S3Akatsiya\2S3";
	scope = 2;
	type = 1;
	faction = "INS";
	vehicleClass = "ARMORED";
	accuracy=0.6;
	armor=160;
	damageResistance = 0.00544;
	mapSize = 9; 
	cost = 2500000;
	sensitivity = 1;	
	threat[] = {0.600000, 0.200000, 0.040000};
	crew = "Ins_Soldier_Crew";
	typicalCargo[]={Ins_Soldier_Crew};
	selectionLeftOffset = "PasOffsetL";
	selectionRightOffset = "PasOffsetP";
	class Turrets: Turrets
		{
			class MainTurret: MainTurret
			{
			stabilizedInAxes = 0;
			maxHorizontalRotSpeed= 0.3;
			maxElev= 50;
			body= "mainTurret";
			turretAxis= "Turret_Axis";
			gunAxis="Maingun_Mem";
			gunBeg= "Maingun_End";
			gunEnd= "Maingun_Start";
			weapons[]={"D20"};
			magazines[] = {46Rnd_152mmHE_D20};
			lockWhenVehicleSpeed  = 5;
			class ViewOptics
  			{
			initAngleX = 0;
  		 	minAngleX = -30;
   			maxAngleX = 30;
   			initAngleY = 0;
   			minAngleY = -100;
  			maxAngleY = 100;
   			initFov = 0.4;
			minFov = 0.4; 
   			maxFov = 0.4;  			
			};
			class ViewGunner
  			{
			initAngleX = 0;
  		 	minAngleX = -30;
   			maxAngleX = 30;
   			initAngleY = 0;
   			minAngleY = -100;
  			maxAngleY = 100;
   			initFov = 0.4;
			minFov = 0.4; 
   			maxFov = 0.4;  			
			};
			};
		};
	};			
};

};

 

Share this post


Link to post
Share on other sites

Update: Solved the problem by inserting >> class turrets{}; << in the Class Mainturret section and thus deleting the commander position. The howitzer will now only engage land vehicles and no air targets.

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  

×