Jump to content
Sign in to follow this  
Αplion

I need help with a turret please ...

Recommended Posts

I'm working on a Ship (a landingcraft) and I wish to have a single turret with a gun on it ... I have everything working (the turret and gun are rotating fine) but the gun isn't firing at all (in game) ... can someone have a look and help me on that ?

There are two pictures with turret and gun as I've them set in O2 ...

turret_gun_zps93f6386a.jpg

turret_gun_points_zps1d9293fa.jpg

My config (turret part only - let me know if something more is needed and I'll add it) ...

class Turrets: Turrets
	{	
		class FrontTurret: NewTurret
		{
			class HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "turretF";
					visual = "turretF";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "gunF";
					visual = "gunF";
					passThrough = 1;
				};
			};
			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			soundServo[] = {"A3\sounds_f\dummysound", db-45, 1.0};
			gunBeg = "gunF_start";
			gunEnd = "gunF_end";
			weapons[] = {"autocannon_40mm_CTWS"};
			magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_shells","40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_shells"};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200};
			discreteDistanceInitIndex = 2;
			gunnerName = "Front Gunner";
			memoryPointGunnerOptics = "gunnerview";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			gunnerCanSee = "2+8+32+4";
			startEngine = 0;
			commanding = -2;
			primaryGunner = 1;
			primaryObserver = 0;
			LODTurnedIn = 1000;
			LODTurnedOut = 1000;
			hasgunner = 1;
			proxyType = "CPGunner";
			proxyIndex = 1;
			usePip = 1;
			minElev = -10;
			maxElev = 60;
			initElev = 0;
			minTurn = -120;
			maxTurn = 120;
			initTurn = 0;
			class ViewOptics: RCWSOptics{};
			class ViewGunner: ViewOptics
			{
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
		};	
	};

My model.cfg ...

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class Vehicle: Default
{
};
class Ship: Vehicle
{
	skeletonInherit="";
	skeletonBones[]=
	{
		"otocvez",
		"",
		"otochlaven",
		"otocvez",
		"kompas",
		"",
		"fuel",
		"",
		"hodinova",
		"",
		"minutova",
		"",
		"mph",
		"",
		"rpm",
		"",
		"rpm2",
		"",
		"volant",
		"",
		"radar",
		""
	};
};
class HAFM_LandCraft_skeleton: Ship
{
	isDiscrete = 1;
	skeletonInherit = "ship";
	skeletonBones[] =
	{
		"haul","",
		"door","",
		"FLdoor","",
		"FRdoor","",
		"Framp","",
		"FrampF","Framp",
		"FrampF","";
		"drivewheel","",
		"radar1","",
		"radar2","",
		"turretF","",
		"recoil1","gunF",
		"gunF","turretF",
		"propR","",
		"propL","",
		"rudderR","",
		"rudderL",""

	};
};
};
class Rotation;
class CfgModels {

class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class allvehicle: Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class Ship: allvehicle
{
	sectionsInherit="";
	sections[]=
	{
		"otocvez",
		"otochlaven",
		"radar",
		"fuel",
		"hodinova",
		"minutova",
		"mph",
		"rpm",
		"rpm2"
	};
};

class HAFM_LandCraft: Ship
{
	sectionsInherit = "Ship";
	sections[] = {"gunF","turretF"};
	skeletonName = "HAFM_LandCraft_skeleton";
	class Animations {

		class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="turretF";
			axis="turretF_axis";
			animPeriod=0;
			minValue="rad -120";
			maxValue="rad +120";
			angle0="rad -110";
			angle1="rad +110";
		};
		class MainGun: MainTurret
		{
			type="rotationX";
			source="mainGun";
			selection="gunF";
			axis="gunF_axis";
			minValue="rad -15";
			maxValue="rad +40";
			angle0="rad -15";
			angle1="rad +40";
		};

		class recoil1
		{
			type="translation";
			//source="ReloadAnim";
			source="Reload";
			memory = 1;
			animPeriod = 0;
			selection="recoil1";
			axis="recoil1_axis";
			minValue=0.85;
			maxValue=1;
			offset0=0;
			offset1=0.3;
		};

		class Radar1
		{
			type="rotation";
			source="time";
			selection="radar1";
			axis="radar1_axis";
			minValue=0;
			maxValue=10.500000;
			sourceAddress="loop";
			angle0=0;
			angle1="rad 360";
		};

		class Radar2
		{
			type="rotation";
			source="time";
			selection="radar2";
			axis="radar2_axis";
			minValue=0;
			maxValue=12.500000;
			sourceAddress="loop";
			angle0=0;
			angle1="rad 360";
		};

		class propR
		{
			type="rotationZ";
			source="rotor";
			selection="propR";
			axis="propR_axis";
			sourceAddress="loop";
			angle0=-62.831852;
			angle1=0;
		};		

		class propL
		{
			type="rotationZ";
			source="rotor";
			selection="propL";
			axis="propL_axis";
			sourceAddress="loop";
			angle0=-62.831852;
			angle1=0;
		};		

		class door
		{
			type="rotation";
			selection="door";
			axis="RampPivot";
			animPeriod=0;
			sourceAddress="clamp";
			memory=1;	
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad 95";
		};

		class Framp
		{
			type="translation";
			sourceAddress="clamp";
			memory = 1;
			animPeriod = 0;
			selection="Framp";
			axis="Framp_axis";
			minValue=0.85;
			maxValue=1;
			offset0=0;
			offset1=-1;
		};
		class FrampF: Framp
		{
			type="rotationX";
			sourceAddress="clamp";
			memory = 1;
			animPeriod = 1;
			selection="FrampF";
			axis="FrampF_axis";
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad -77";
		};

		class FLdoor: Framp
		{
			type="rotation";
			selection="FLdoor";
			axis="FLdoor_axis";
			animPeriod=0;
			sourceAddress="clamp";
			memory=1;	
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad -30";
		};

		class FRdoor: Framp
		{
			type="rotation";
			selection="FRdoor";
			axis="FRdoor_axis";
			animPeriod=0;
			sourceAddress="clamp";
			memory=1;	
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad 30";
		};

		class DrivingWheel
		{
			type = "rotation";
			source = "drivingWheel";
			selection = "drivewheel";
			axis = "drivewheel_axis";
			memory = 0;
			angle0 = "rad -120";
			angle1 = "rad 120";
			minValue = -1;
			maxValue = 1;
		};

		class rudderR
		{
			type = "rotation";
			source = "drivingWheel";
			selection = "rudderR";
			axis = "rudderR_axis";
			memory = 0;
			angle0 = "rad -50";
			angle1 = "rad 50";
			minValue = -1;
			maxValue = 1;
		};
		class rudderL: rudderR
		{
			selection = "rudderL";
			axis = "rudderL_axis";
		};
	};
};
class misc1: HAFM_LandCraft{};
class misc2: HAFM_LandCraft{};
};

Any help will be much appreciated.

Aplion

Share this post


Link to post
Share on other sites

this is 99% likely the cause

model.cfg

"recoil1","gunF",

"gunF","turretF",

swap these around Ap, the bottom one defines gunF and the top one inherits from it.

other ideas

maybe define this fully

class ViewOptics: RCWSOptics{};

lastly

autocannon_40mm_CTWS

im not familiar with A3 configs, but is this an mg or a cannon?

i think its defined as a cannon, with muzzleeffects and no muzzle-flash as such (like an MG)

if so, d oyou need firedfromturret=1; in your cfgvehicles turret config?

Edited by eggbeast

Share this post


Link to post
Share on other sites

@eggbeast ... the most strange thing mate is that I've already another ship turret with exactly the same configuration and it is working fine ... thats why I can't understand what might be wrong with this one !!

In any case I've tried your first suggestion of swapping with no luck (I believe anyway that these values are working as pairs so there is no order matter) ... still not firing.

autocannon_40mm_CTWS is a cannon and it is an A3 default classname which (as I said above) is working fine on another ship turret I have ... in fact both, turret part config and model.cfg values, are the same as of this working one ... but here the behavior is different as the turret and the gun are moving fine but not firing at all ..

I'm still confused ...

Share this post


Link to post
Share on other sites

in the picture you've got gunF_end and gunF_beg

but in the config:

gunBeg = "gunF_start";
gunEnd = "gunF_end"; 

Share this post


Link to post
Share on other sites
in the picture you've got gunF_end and gunF_beg

but in the config:

gunBeg = "gunF_start";
gunEnd = "gunF_end"; 

My mistake is in the picture (sorry about that) ... both in memory lod and config values are the same (gunF_start and gunF_end).

Share this post


Link to post
Share on other sites
(I believe anyway that these values are working as pairs so there is no order matter)

i am almost certain that the first item inherits from the second in the list of bones

so if you don't declare one and then try to inherit from it that will surely break your config, unless its defined in a base class you also inherit from.

---------- Post added at 01:48 PM ---------- Previous post was at 01:46 PM ----------

can you post the turrets config for the working version you have?

class Turrets: Turrets

{

class FrontTurret: NewTurret

is NewTurret properly defined elsewhere?

do you need a MainTurret as first turret?

Share this post


Link to post
Share on other sites
i am almost certain that the first item inherits from the second in the list of bones

so if you don't declare one and then try to inherit from it that will surely break your config, unless its defined in a base class you also inherit from.

---------- Post added at 01:48 PM ---------- Previous post was at 01:46 PM ----------

can you post the turrets config for the working version you have?

is NewTurret properly defined elsewhere?

do you need a MainTurret as first turret?

Mate as I said I've tried the swapping and didn't work ...

As for working version of the turrets are exactly the same as this I have here (copy - paste) ... but anyway here it is ...

class Turrets: Turrets
	{
		class FrontTurret: NewTurret
		{
			class HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "turretF";
					visual = "turretF";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "gunF";
					visual = "gunF";
					passThrough = 1;
				};
			};
			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			soundServo[] = {"A3\sounds_f\dummysound", db-45, 1.0};
			gunBeg = "gunF_start";
			gunEnd = "gunF_end";
			weapons[] = {"autocannon_40mm_CTWS"};
			magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_shells","40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_shells"};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200};
			discreteDistanceInitIndex = 2;
			gunnerName = "Front Gunner";
			memoryPointGunnerOptics = "gunnerview";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			gunnerCanSee = "2+8+32+4";
			//memoryPointGun = "kulas";
			//gunnerCanSee = 23;
			startEngine = 0;
			commanding = -2;
			primaryGunner = 1;
			primaryObserver = 0;
			LODTurnedIn = 1000;
			LODTurnedOut = 1000;
			hasgunner = 1;
			proxyType = "CPGunner";
			proxyIndex = 1;
			usePip = 1;
			minElev = -10;
			maxElev = 60;
			initElev = 0;
			minTurn = -90;
			maxTurn = 90;
			initTurn = 0;
			class ViewOptics: RCWSOptics{};
			class ViewGunner: ViewOptics
			{
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
		};
};

Also here is the full config.cpp of my problematic addon :) ... just in case ...

#define _ARMA_

//ndefs=13
enum {
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxesxyz = 4,
stabilizedinaxisy = 2,
stabilizedinaxesboth = 3,
destructno = 0,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};

class CfgPatches
{
class HAFM_Navy
{
	units[] = {"HAFM_LandCraft"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Boat_F","HAFM_Army_Units"};
};
};

class CfgFactionClasses
{
class Hellas
{
 displayName = "Hellas";
 priority = 8;
 side = 2;
};
};

class CfgVehicleClasses
{
class Hellenic_NAVY
{
	displayName = "Hellenic NAVY";
};
};

class DefaultEventhandlers;
class RCWSOptics;

class CfgVehicles 
{
class Ship_F;
class Boat_F: Ship_F
{
	class NewTurret;
	class Turrets;
	class ViewOptics;
};

class HAFM_LandCraft_Base : Boat_F 
{
	scope = 1;
	faction = "Hellas";
	side = 2;
	crew = "GR_E_NAVY";
	mapSize = 50;
	_generalMacro = "HAFM_LandCraft";
	displayName = "$STR_A3_CFGVEHICLES_Boat_Armed_01_Base0";
	vehicleClass = "Hellenic_NAVY";
	accuracy = 0.5;
	model = "\HAFM_Navy\HAFM_LandCraft\HAFM_LandCraft.p3d";
	picture = "\A3\boat_f\Boat_Armed_01\data\ui\Boat_Armed_01_base.paa";
	Icon = "\A3\boat_f\Boat_Armed_01\data\ui\map_boat_armed_01.paa";
	unitInfoType = "UnitInfoShip";
	memoryPointsGetInDriver = "pos pilot";
	memoryPointsGetInDriverDir = "pos pilot dir";
	memoryPointsGetInCargo = "pos cargo";
	memoryPointsGetInCargoDir = "pos cargo dir";
	preciseGetInOut = 1;
	cargoPreciseGetInOut[] = {1};
	hasDriver = 1;
	hasGunner = 1;
	hasCommander = 1;
	hasCrew = 1;
	hideWeaponsDriver = 1;
	hideWeaponsCargo = 1;
	attenuationEffectType = "CarAttenuation";
	threat[] = {0.2,0.9,1};
	insideSoundCoef = 0;
	soundEngineOnInt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-start-02",0.56234133,1.0};
	soundEngineOnExt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-start-02",0.56234133,1.0,200};
	soundEngineOffInt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-stop-02",0.56234133,1.0};
	soundEngineOffExt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-stop-02",0.56234133,1.0,200};
	buildCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_01",1.7782794,1,200};
	buildCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_02",1.7782794,1,200};
	buildCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_03",1.7782794,1,200};
	buildCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_04",1.7782794,1,200};
	soundBuildingCrash[] = {"buildCrash0",0.25,"buildCrash1",0.25,"buildCrash2",0.25,"buildCrash3",0.25};
	WoodCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_01",1.7782794,1,200};
	WoodCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_02",1.7782794,1,200};
	WoodCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_03",1.7782794,1,200};
	WoodCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_04",1.7782794,1,200};
	WoodCrash4[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_05",1.7782794,1,200};
	WoodCrash5[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_06",1.7782794,1,200};
	soundWoodCrash[] = {"woodCrash0",0.166,"woodCrash1",0.166,"woodCrash2",0.166,"woodCrash3",0.166,"woodCrash4",0.166,"woodCrash5",0.166};
	ArmorCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_01",1.7782794,1,200};
	ArmorCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_02",1.7782794,1,200};
	ArmorCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_03",1.7782794,1,200};
	ArmorCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_04",1.7782794,1,200};
	soundArmorCrash[] = {"ArmorCrash0",0.25,"ArmorCrash1",0.25,"ArmorCrash2",0.25,"ArmorCrash3",0.25};
	class Sounds
	{
		class IdleOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-idle-2",0.5011872,1.0,300};
			frequency = "0.95	+	((rpm/	1200) factor[(100/	1200),(300/	1200)])*0.15";
			volume = "engineOn*(((rpm/	1200) factor[(0/	1200),(30/	1200)])	*	((rpm/	1200) factor[(500/	1200),(300/	1200)]))";
		};
		class Engine
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-low-2",0.63095737,1.0,450};
			frequency = "0.95	+	((rpm/	1200) factor[(300/	1200),(600/	1200)])*0.2";
			volume = "engineOn*(((rpm/	1200) factor[(150/	1200),(250/	1200)])	*	((rpm/	1200) factor[(600/	1200),(400/	1200)]))";
		};
		class EngineMidOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-mid-2",0.7943282,1.0,500};
			frequency = "0.95	+		((rpm/	1200) factor[(600/	1200),(900/	1200)])*0.2";
			volume = "engineOn*(((rpm/	1200) factor[(350/	1200),(500/	1200)])	*	((rpm/	1200) factor[(1000/	1200),(700/	1200)]))";
		};
		class EngineMaxOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-high-2",1.0,1.0,600};
			frequency = "0.95	+	((rpm/	1200) factor[(700/	1200),(1000/	1200)])*0.2";
			volume = "engineOn*((rpm/	1200) factor[(800/	1200),(1200/	1200)])";
		};
		class WaternoiseOutW0
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-0-speed1",0.70794576,1.0,150};
			frequency = "1";
			volume = "(speed factor[4, 1])";
		};
		class WaternoiseOutW1
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-20-speed",0.7943282,1.0,250};
			frequency = "1";
			volume = "((speed factor[2, 6]) min (speed factor[6, 4]))";
		};
		class WaternoiseOutW2
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-50-speed",1.0,1.0,350};
			frequency = "1";
			volume = "(speed factor[3, 9])";
		};
	};
	class RenderTargets
	{
		class driver_display_1
		{
			renderTarget = "rendertarget0";
			class CameraView1
			{
				pointPosition = "PIP0_pos";
				pointDirection = "PIP0_dir";
				renderVisionMode = 1;
				renderQuality = 0;
				fov = 0.4;
			};
		};
		class Gunner_1
		{
			renderTarget = "rendertarget3";
			class CameraView1
			{
				pointPosition = "PIP3_pos";
				pointDirection = "PIP3_dir";
				renderVisionMode = 0;
				renderQuality = 0;
				fov = 0.5;
			};
		};
		class Gunner_2
		{
			renderTarget = "rendertarget3";
			class CameraView1
			{
				pointPosition = "PIP3_pos";
				pointDirection = "PIP3_dir";
				renderVisionMode = 2;
				renderQuality = 0;
				fov = 0.5;
			};
		};
	};
	class HitPoints
	{
		class HitBody
		{
			armor = 0.7;
			material = 50;
			name = "Haul";
			visual = "Haul";
			passThrough = 1;
		};
		class HitEngine
		{
			armor = 0.12;
			material = -1;
			name = "Engine";
			visual = "";
			passThrough = 1;
		};

	};
	driverLeftHandAnimName = "drivewheel";
	driverRightHandAnimName = "drivewheel";
	driverAction = "driver_boat01";
	//cargoAction[] = {"passenger_boat_rightrear","passenger_flatground_leanright","passenger_boat_holdright2","passenger_boat_holdleft2","passenger_flatground_leanright","passenger_flatground_leanleft","passenger_boat_holdright","passenger_boat_holdleft"};
	cargoAction[] = {"passenger_generic01_foldhands","passenger_generic01_foldhands","passenger_generic01_foldhands","passenger_generic01_foldhands"};
	getInAction = "GetInMedium";
	getOutAction = "GetOutMedium";
	cargoGetInAction[] = {"GetInMedium"};
	cargoGetOutAction[] = {"GetOutMedium"};
	castDriverShadow = 1;
	castCargoShadow = 1;
	gunnerHasFlares = 0;
	enableGPS = 1;
	transportSoldier = 4;
	cost = 100000;
	armor = 450;
	commanding = 2;

	class TransportItems
	{
		class _xx_FirstAidKit
		{
			name = "FirstAidKit";
			count = 20;
		};
		class _xx_medikit
		{
			name = "medikit";
			count = 20;
		};
	};
	supplyRadius = 10;
	precision = 15;
	steerAheadSimul = 0.5;
	steerAheadPlan = 0.35;
	predictTurnPlan = 0.8;
	predictTurnSimul = 0.6;
	brakeDistance = 60.0;
	acceleration = 10;
	turnCoef = 0.75;
	maxSpeed = 48;
	simulation = "ship";
	thrustDelay = 2;
	overSpeedBrakeCoef = 0.2;
	enginePower = 300;
	engineShiftY = -0.1;
	waterLeakiness = 55.5;
	waterLinearDampingCoefY = 5;
	waterLinearDampingCoefX = 2.0;
	waterAngularDampingCoef = 1.2;
	waterResistanceCoef = 0.0015;
	rudderForceCoef = 0.3;
	rudderForceCoefAtMaxSpeed = 0.02;
	idleRpm = 200;
	redRpm = 1200;
	class complexGearbox
	{
		GearboxRatios[] = {"R1",-0.782,"N",0,"D1",2};
		TransmissionRatios[] = {"High",1.0};
		gearBoxMode = "auto";
		moveOffGear = 1;
		driveString = "D";
		neutralString = "N";
		reverseString = "R";
	};
	enableManualFire = 0;
	smokeLauncherGrenadeCount = 8;
	smokeLauncherVelocity = 14;
	smokeLauncherOnTurret = 0;
	smokeLauncherAngle = 360;
	weapons[] = {"SmokeLauncher"};
	magazines[] = {"SmokeLauncherMag_boat","SmokeLauncherMag_boat","SmokeLauncherMag_boat"};
	class Exhausts
	{
		class Exhaust1
		{
			position = "Exhaust1";
			direction = "Exhaust1_dir";
			effect = "DamageSmokePlane";
		};
	};
	leftFastWaterEffect = "LFastWaterEffects";
	rightFastWaterEffect = "RFastWaterEffects";
	waterEffectSpeed = 5;
	engineEffectSpeed = 5;
	waterFastEffectSpeed = 20;

	driverCompartments = "Compartment1";
	cargoCompartments[] = {"Compartment1"};

	extCameraPosition[] = {0,2,-80.0};

	class AnimationSources
	{
		class recoil1
		{
			source = "reload";
			//weapon = "Cannon_40mm_CTWS";
			weapon = "autocannon_40mm_CTWS";
		};

		class door 
		{
			//source = "user";
			animPeriod = 3;
			//initPhase = 0;
		};
		class Framp
		{
			//source = "user";
			animPeriod = 4;
			//initPhase = 0;
		};
		class FLdoor: Framp	{animPeriod = 3;};
		class FRdoor: Framp	{animPeriod = 3;};
		class FrampF: Framp	{animPeriod = 5;};

	};

	class Turrets: Turrets
	{	
		class FrontTurret: NewTurret
		{
			class HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "turretF";
					visual = "turretF";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "gunF";
					visual = "gunF";
					passThrough = 1;
				};
			};
			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			soundServo[] = {"A3\sounds_f\dummysound", db-45, 1.0};
			gunBeg = "gunF_start";
			gunEnd = "gunF_end";
			weapons[] = {"autocannon_40mm_CTWS"};
			magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_shells","40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_shells"};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200};
			discreteDistanceInitIndex = 2;
			gunnerName = "Front Gunner";
			memoryPointGunnerOptics = "gunnerview";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			gunnerCanSee = "2+8+32+4";
			startEngine = 0;
			commanding = -2;
			primaryGunner = 1;
			primaryObserver = 0;
			LODTurnedIn = 1000;
			LODTurnedOut = 1000;
			hasgunner = 1;
			proxyType = "CPGunner";
			proxyIndex = 1;
			usePip = 1;
			minElev = -10;
			maxElev = 60;
			initElev = 0;
			minTurn = -120;
			maxTurn = 120;
			initTurn = 0;
			class ViewOptics: RCWSOptics{};
			class ViewGunner: ViewOptics
			{
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
		};	
	};

	class UserActions {

		class ParkAction
		{
			displayName="Park Vehicle";
			position="pos2";
			onlyforplayer=0;
			radius=35;
			condition="(vehicle player) != player && (vehicle player) isKindOf ""LandVehicle"" && isNull ((vehicle player) getVariable [""AplionAttached"", objNull])";
			statement= "[this, vehicle player] execVM ""\HAFM_Navy\HAFM_LandCraft\scripts\parkVehicle.sqf""";
		};

		class Openramp {
			userActionID = 101;
			displayName = "Open AFT Ramp";
			position = "RampPivot";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door"" < 0.5 && speed vehicle this < 1 && player == driver this";
			statement = "this animate [""door"", 1]";
		};

		class Closeramp {
			userActionID = 102;
			displayName = "Close AFT Ramp";
			position = "RampPivot";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door"" >= 0.5 && player == driver this";
			statement = "this animate [""door"", 0]";
		};

		class Openramp2 {
			userActionID = 103;
			displayName = "Open FWD Ramp";
			position = "Framp_axis";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""Framp"" < 0.5 && speed vehicle this < 1 && player == driver this";
			statement = "this animate [""Framp"", 1] && this animate [""FLdoor"", 1] && this animate [""FRdoor"", 1] && this animate [""FrampF"", 1]";
		};

		class Closeramp2 {
			userActionID = 104;
			displayName = "Close FWD Ramp";
			position = "Framp_axis";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""Framp"" >= 0.5 && player == driver this";
			statement = "this animate [""Framp"", 0] && this animate [""FLdoor"", 0] && this animate [""FRdoor"", 0] && this animate [""FrampF"", 0]";
		};

		class load_on
		{
			userActionID = 107;
			displayName = "Loading Condition ON";
			displayNameDefault = "Loading Condition";
			position = "pos2";
			priority = 1;
			radius = 50;
			animPeriod = 0.1;
			onlyForPlayer = 0;
			condition = "vehicle player == vehicle this && this animationPhase ""door"" > 0.8 && speed vehicle this < 1";
			statement = "[this,player] execVM ""\HAFM_Navy\HAFM_LandCraft\scripts\LoadProcedure.sqf""";
		};

		class Driver_pos
		{
			userActionID = 106;
			displayName = "Getin Driver Pos";
			displayNameDefault = "Getin Driver Pos";
			position = "pos2";
			priority = 1;
			radius = 40;
			animPeriod = 0.1;
			onlyForPlayer = 0;
			condition = "Vehicle Player != Vehicle this";
			statement = "player moveindriver this; this enableSimulation true";
		};
	};

	actionBegin1 = "Openramp";
	actionEnd1 = "Closeramp";
	actionBegin2 = "Openramp2";
	actionEnd2 = "Closeramp2";

	class Reflectors
	{
		class Right
		{
			color[] = {0.75,0.75,0.85};
			ambient[] = {0.0005,0.0005,0.0005};
			position = "P svetlo";
			direction = "konec P svetla";
			hitpoint = "P svetlo";
			selection = "P svetlo";
			size = 1;
			innerAngle = 35;
			outerAngle = 180;
			coneFadeCoef = 40;
			intensity = 5;
			useFlare = 0;
			dayLight = 0;
			flareSize = 0.75;
			class Attenuation
			{
				start = 30;
				constant = 4.0;
				linear = 0.0;
				quadratic = 1.0;
			};
		};
		class Right2: Right
		{
			position = "PIP0_pos";
			useFlare = 1;
		};
	};
	aggregateReflectors[] = {
		{ "Right","Right2" }};
	hiddenSelections[] = {"Camo","Camo2","Camo3"};

	class Library
	{
		libTextDesc = "$STR_A3_CfgVehicles_Boat_Armed_01_Base_Library0";
	};

	class Damage
	{
		tex[] = {};
		mat[] = {};
	};
};
class HAFM_LandCraft: HAFM_LandCraft_Base
{
	author = "Aplion";
	scope = 2;
	side = 2;
	model = "\HAFM_Navy\HAFM_LandCraft\HAFM_LandCraft.p3d";
	picture = "\A3\boat_f\Boat_Armed_01\data\ui\Boat_Armed_01_minigun.paa";
	Icon = "\A3\boat_f\Boat_Armed_01\data\ui\map_boat_armed_01_minigun.paa";
	displayName = "LandCraft_BIG";

	class AnimationSources: AnimationSources{};

	class Turrets: Turrets
	{
		class FrontTurret: FrontTurret {};

	};
};
};

Share this post


Link to post
Share on other sites

well try scope 2 ing your base vehicle and i bet that works

this scope 2 child vehicle turret

class AnimationSources: AnimationSources{};

class Turrets: Turrets

{

class FrontTurret: FrontTurret {};

};

is very likely to be wiping your turret blank in the version of the vehicle you are actually testing

Share this post


Link to post
Share on other sites
well try scope 2 ing your base vehicle and i bet that works

this scope 2 child vehicle turret

is very likely to be wiping your turret blank in the version of the vehicle you are actually testing

I've tried this also mate but nothing changed ...

Share this post


Link to post
Share on other sites
is NewTurret properly defined elsewhere?

do you need a MainTurret as first turret?

did you look at this?

i can normally fix a turret in seconds these days. this is becoming a challenge...

---------- Post added at 08:34 PM ---------- Previous post was at 08:33 PM ----------

what exactly happens? can you enter the turret and see the weapon listed? but just not fire it?

and if you take a stock vehicle and addweapon and addmagazine the same stuff to the turret, will that fire? (i.e. can we rule out an ammo failure)

Share this post


Link to post
Share on other sites
did you look at this?

i can normally fix a turret in seconds these days. this is becoming a challenge...

---------- Post added at 08:34 PM ---------- Previous post was at 08:33 PM ----------

what exactly happens? can you enter the turret and see the weapon listed? but just not fire it?

and if you take a stock vehicle and addweapon and addmagazine the same stuff to the turret, will that fire? (i.e. can we rule out an ammo failure)

As I said this turret configuration is already working through another addon I made ... even in this addon when I'm in game I'm able to see the weapon and magazines (as a gunner) ... also I remind you that I've another addon with same configuration and the gun has no issue firing ... sorry if you proposed something else and I don't understand it mate but so far following this setup ... the weapon isn't fire ...

Eggbeast ... mate ... I can send you the files in case you want to have a closer look if you like ... just let me know ...

Share this post


Link to post
Share on other sites

well i don't have a3 tools installed so can't do much with the model ap

but it seems very strange that you have this problem.

i'll ask pook to read the topic and see if he can spot anything, he's a turret maestro.

---------- Post added at 11:31 PM ---------- Previous post was at 11:26 PM ----------

selection="recoil1";

is this defined in the model?

Share this post


Link to post
Share on other sites
@eggbeast ... the most strange thing mate is that I've already another ship turret with exactly the same configuration and it is working fine ... thats why I can't understand what might be wrong with this one !!
In any case I've tried your first suggestion of swapping with no luck (I believe anyway that these values are working as pairs so there is no order matter)
Incorrect... order absolutely matters, as the skeleton configuration is a parent-child relationship. All described in the BIKI model.cfg article.
but here the behavior is different as the turret and the gun are moving fine but not firing at all ..

So the ANIMATIONS are moving you say... in other words the exact issue is the gun "not firing at all". If I am understanding that statement correctly, then your turret config is missing information such as "weapon" and "magazine". Just to be clear - weapon moves up/down and the turret spins around? Or did I misunderstand?

Can you copy/paste your other config's turret data that works? Perhaps there's something we'll see. Make sure you have added the relevant info for the turret config:

body = "xxx";

gun = "xxx";

gunBeg = "xxx";

gunEnd = "xxx";

animationSourceGun = "xxx";

As I said this turret configuration is already working through another addon I made ...
case in point it is not working in THIS addon, so something in THIS config or THIS model is munged. Can't tell you how many times I've copy/pasted from working only to have to reconfig something later. Just the nature of the beast.

Share this post


Link to post
Share on other sites
@eggbeast ... the most strange thing mate is that I've already another ship turret with exactly the same configuration and it is working fine ... thats why I can't understand what might be wrong with this one !!

Incorrect... order absolutely matters, as the skeleton configuration is a parent-child relationship. All described in the BIKI model.cfg article.

So the ANIMATIONS are moving you say... in other words the exact issue is the gun "not firing at all". If I am understanding that statement correctly, then your turret config is missing information such as "weapon" and "magazine". Just to be clear - weapon moves up/down and the turret spins around? Or did I misunderstand?

Can you copy/paste your other config's turret data that works? Perhaps there's something we'll see. Make sure you have added the relevant info for the turret config:

body = "xxx";

gun = "xxx";

gunBeg = "xxx";

gunEnd = "xxx";

animationSourceGun = "xxx";

case in point it is not working in THIS addon, so something in THIS config or THIS model is munged. Can't tell you how many times I've copy/pasted from working only to have to reconfig something later. Just the nature of the beast.

Please have a look in first page of this topic mate ... you will find everything you asked there ... let me know if something more is needed.

---------- Post added at 10:10 ---------- Previous post was at 10:06 ----------

As I said this turret configuration is already working through another addon I made ... even in this addon when I'm in game I'm able to see the weapon and magazines (as a gunner) ... also I remind you that I've another addon with same configuration and the gun has no issue firing ... sorry if you proposed something else and I don't understand it mate but so far following this setup ... the weapon isn't fire ...

Eggbeast ... mate ... I can send you the files in case you want to have a closer look if you like ... just let me know ...

Yes selection "recoil1" is defined in model as the front part of the gun and the axis too in memory lod.

Share this post


Link to post
Share on other sites

ok ap, well if you would like any further help, and we're happy to try, can you post up a new set of data with all of the elements updated since the original post. then we can really stare at it. maybe if you post up the working vs the non-working...

Share this post


Link to post
Share on other sites
ok ap, well if you would like any further help, and we're happy to try, can you post up a new set of data with all of the elements updated since the original post. then we can really stare at it. maybe if you post up the working vs the non-working...

Ofcourse I need help mate as I'm still stuck ... here are the configs and model.cfg of each working and non-working addons ...

Working Config.cpp

#define _ARMA_

enum {
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxesxyz = 4,
stabilizedinaxisy = 2,
stabilizedinaxesboth = 3,
destructno = 0,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};


class CfgPatches
{
class HAFM_Navy
{
	units[] = {"HAFM_Frigate"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Boat_F","HAFM_Army_Units"};
};
};

class CfgFactionClasses
{
class Hellas
{
 displayName = "Hellas";
 priority = 8;
 side = 2;
};
};

class CfgVehicleClasses
{
class Hellenic_NAVY
{
	displayName = "Hellenic NAVY";
};
};

class CfgAmmo
{
class MissileCore;
class MissileBase;
class M_Titan_AA;
class M_Titan_AA_long;
class M_Air_AA;
class Searam_AA_20: M_Titan_AA
{
	model = "\A3\Weapons_F_beta\Launchers\titan\titan_missile_ap_fly.p3d";
	hit = 100;
	indirectHit = 50;
	indirectHitRange = 8;
	maneuvrability = 10;
	simulationStep = 0.002;
	trackOversteer = 1;
	trackLead = 1;
	airLock = 2;
	irLock = 1;
	cost = 1000;
	timeToLive = 15;
	airFriction = 0.026;
	sideAirFriction = 0.003;
	maxSpeed = 850;
	initTime = 0.25;
	thrustTime = 2.5;
	thrust = 385;
	fuseDistance = 50;
	CraterEffects = "AAMissileCrater";
	explosionEffects = "AAMissileExplosion";
	effectsMissileInit = "RocketBackEffectsRPG";
	effectsMissile = "missile3";
	weaponLockSystem = "2 + 16";
	class CamShakeExplode
	{
		power = "(110*0.2)";
		duration = "((round (110^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((8 + 110^0.5)*8)";
	};
	class CamShakeHit
	{
		power = 110;
		duration = "((round (110^0.25))*0.2 max 0.2)";
		frequency = 20;
		distance = 1;
	};
	class CamShakeFire
	{
		power = "(60^0.25)";
		duration = "((round (60^0.5))*0.2 max 0.2)";
		frequency = 20;
		distance = "((60^0.5)*8)";
	};
	class CamShakePlayerFire
	{
		power = 3;
		duration = 0.1;
		frequency = 20;
		distance = 1;
	};
};
};
class CfgMagazines
{
class CA_LauncherMagazine;
class Titan_AA;
class 4Rnd_Titan_long_missiles;
class 2Rnd_AAA_missiles;
class Searam_AA_mag: Titan_AA
{
	scope = 2;
	displayName = "Searam_Titan_AA";
	displayNameShort = "Searam_Titan_AA";
	ammo = "Searam_AA_20";
	nameSound = "missile";
	descriptionShort = "Searam_Titan_AA";
	count = 20;
};

};

class CfgWeapons
{
class MissileLauncher; 
class LauncherCore;
class missiles_ASRAAM;
class Launcher_Base_F;
class missiles_titan;

class SeaRAM_AA: missiles_titan
{
	scope = 2;
	displayName = "SeaRAM AA";
	magazines[] = {"Searam_AA_mag"};
	canLock = 2;
	lockAcquire = 0;
	weaponLockSystem = 1;
	minRange = 5;
	minRangeProbab = 0.8;
	midRange = 2500;
	midRangeProbab = 0.9;
	maxRange = 4800;
	maxRangeProbab = 0.7;
	aiRateOfFire = 2.0;
	aiRateOfFireDistance = 2500;
	sound[] = {"A3\Sounds_F\weapons\Rockets\missile_2",1.1220185,1.3,1000};
	soundFly[] = {"A3\Sounds_F\weapons\Rockets\rocket_fly_2",1.0,1.5,700};
	lockingTargetSound[] = {"\A3\Sounds_F\weapons\Rockets\locked_1",0.17782794,1};
	lockedTargetSound[] = {"\A3\Sounds_F\weapons\Rockets\locked_3",0.17782794,2.5};
};
};

class DefaultEventhandlers;
class RCWSOptics;
class CfgVehicles
{
class Ship_F;
class Boat_F: Ship_F
{
	class NewTurret;
	class Turrets;
	class ViewOptics;
};

class HAFM_Frigate_Base: Boat_F
{
	author = "Aplion";
	scope = 1;
	faction = "Hellas";
	side = 2;
	crew = "GR_E_NAVY";
	mapSize = 50;
	hasDriver = 1;
	hasGunner = 1;
	hasCommander = 1;
	hasCrew = 1;
	driverCanSee = 31;
	commanderCanSee = 31;
	gunnerCanSee = 31;
	_generalMacro = "HAFM_Frigate";
	displayName = "$STR_A3_CFGVEHICLES_Boat_Armed_01_Base0";
	vehicleClass = "Hellenic_NAVY";
	accuracy = 0.5;
	model = "\HAFM_Navy\HAFM_Frigate\HAFM_Frigate.p3d";
	picture = "\A3\boat_f\Boat_Armed_01\data\ui\Boat_Armed_01_base.paa";
	Icon = "\A3\boat_f\Boat_Armed_01\data\ui\map_boat_armed_01.paa";
	unitInfoType = "UnitInfoShip";
	attenuationEffectType = "CarAttenuation";
	memoryPointsGetInDriver = "pos pilot";
	memoryPointsGetInDriverDir = "pos pilot dir";
	memoryPointsGetInCargo = "pos cargo";
	memoryPointsGetInCargoDir = "pos cargo dir";
	preciseGetInOut = 1;
	cargoPreciseGetInOut[] = {1};
	hideWeaponsDriver = 1;
	hideWeaponsCargo = 1;
	LockDetectionSystem = "2 + 8 + 4";
	incomingMissileDetectionSystem = 16;
	radarType = 4;
	laserTarget = 1;
	laserScanner = 1;
	irTarget = 1;
	irScanRangeMin = 50;
	irScanRangeMax = 200000;
	irScanToEyeFactor = 14;
	irScanGround = 1;
	allowTabLock = 1;
	showAllTargets = 2;
	threat[] = {0.2,0.9,1};
	insideSoundCoef = 0;
	soundEngineOnInt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-start-02",0.56234133,1.0};
	soundEngineOnExt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-start-02",0.56234133,1.0,200};
	soundEngineOffInt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-stop-02",0.56234133,1.0};
	soundEngineOffExt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-stop-02",0.56234133,1.0,200};
	buildCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_01",1.7782794,1,200};
	buildCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_02",1.7782794,1,200};
	buildCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_03",1.7782794,1,200};
	buildCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_04",1.7782794,1,200};
	soundBuildingCrash[] = {"buildCrash0",0.25,"buildCrash1",0.25,"buildCrash2",0.25,"buildCrash3",0.25};
	WoodCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_01",1.7782794,1,200};
	WoodCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_02",1.7782794,1,200};
	WoodCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_03",1.7782794,1,200};
	WoodCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_04",1.7782794,1,200};
	WoodCrash4[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_05",1.7782794,1,200};
	WoodCrash5[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_06",1.7782794,1,200};
	soundWoodCrash[] = {"woodCrash0",0.166,"woodCrash1",0.166,"woodCrash2",0.166,"woodCrash3",0.166,"woodCrash4",0.166,"woodCrash5",0.166};
	ArmorCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_01",1.7782794,1,200};
	ArmorCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_02",1.7782794,1,200};
	ArmorCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_03",1.7782794,1,200};
	ArmorCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_04",1.7782794,1,200};
	soundArmorCrash[] = {"ArmorCrash0",0.25,"ArmorCrash1",0.25,"ArmorCrash2",0.25,"ArmorCrash3",0.25};
	class Sounds
	{
		class IdleOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-idle-2",0.5011872,1.0,300};
			frequency = "0.95	+	((rpm/	1200) factor[(100/	1200),(300/	1200)])*0.15";
			volume = "engineOn*(((rpm/	1200) factor[(0/	1200),(30/	1200)])	*	((rpm/	1200) factor[(500/	1200),(300/	1200)]))";
		};
		class Engine
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-low-2",0.63095737,1.0,450};
			frequency = "0.95	+	((rpm/	1200) factor[(300/	1200),(600/	1200)])*0.2";
			volume = "engineOn*(((rpm/	1200) factor[(150/	1200),(250/	1200)])	*	((rpm/	1200) factor[(600/	1200),(400/	1200)]))";
		};
		class EngineMidOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-mid-2",0.7943282,1.0,500};
			frequency = "0.95	+		((rpm/	1200) factor[(600/	1200),(900/	1200)])*0.2";
			volume = "engineOn*(((rpm/	1200) factor[(350/	1200),(500/	1200)])	*	((rpm/	1200) factor[(1000/	1200),(700/	1200)]))";
		};
		class EngineMaxOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-high-2",1.0,1.0,600};
			frequency = "0.95	+	((rpm/	1200) factor[(700/	1200),(1000/	1200)])*0.2";
			volume = "engineOn*((rpm/	1200) factor[(800/	1200),(1200/	1200)])";
		};
		class WaternoiseOutW0
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-0-speed1",0.70794576,1.0,150};
			frequency = "1";
			volume = "(speed factor[4, 1])";
		};
		class WaternoiseOutW1
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-20-speed",0.7943282,1.0,250};
			frequency = "1";
			volume = "((speed factor[2, 6]) min (speed factor[6, 4]))";
		};
		class WaternoiseOutW2
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-50-speed",1.0,1.0,350};
			frequency = "1";
			volume = "(speed factor[3, 9])";
		};
	};
	class RenderTargets
	{
		class driver_display_1
		{
			renderTarget = "rendertarget0";
			class CameraView1
			{
				pointPosition = "PIP0_pos";
				pointDirection = "PIP0_dir";
				renderVisionMode = 1;
				renderQuality = 0;
				fov = 0.4;
			};
		};
		class Gunner_1
		{
			renderTarget = "rendertarget3";
			class CameraView1
			{
				pointPosition = "PIP3_pos";
				pointDirection = "PIP3_dir";
				renderVisionMode = 0;
				renderQuality = 0;
				fov = 0.5;
			};
		};
		class Gunner_2
		{
			renderTarget = "rendertarget3";
			class CameraView1
			{
				pointPosition = "PIP3_pos";
				pointDirection = "PIP3_dir";
				renderVisionMode = 2;
				renderQuality = 0;
				fov = 0.5;
			};
		};
	};
	class HitPoints
	{
		class HitBody
		{
			armor = 0.7;
			material = 50;
			name = "Haul";
			visual = "";
			passThrough = 1;
		};
		class HitEngine
		{
			armor = 0.12;
			material = -1;
			name = "Engine";
			visual = "";
			passThrough = 1;
		};

	};
	driverLeftHandAnimName = "drivewheel";
	driverRightHandAnimName = "drivewheel";
	driverAction = "driver_boat01";
	cargoAction[] = {"passenger_generic01_foldhands","passenger_generic01_foldhands"};
	getInAction = "GetInMedium";
	getOutAction = "GetOutMedium";
	cargoGetInAction[] = {"GetInMedium"};
	cargoGetOutAction[] = {"GetOutMedium"};
	castDriverShadow = 1;
	castCargoShadow = 1;
	gunnerHasFlares = 0;
	enableGPS = 1;
	transportSoldier = 2;
	cost = 10000;
	armor = 400;
	commanding = 0;
	driverCanEject = 0;
	cargoCanEject = 1;

	class TransportItems
	{
		class _xx_FirstAidKit
		{
			name = "FirstAidKit";
			count = 20;
		};
		class _xx_medikit
		{
			name = "medikit";
			count = 20;
		};
	};
	supplyRadius = 3;
	precision = 15;
	steerAheadSimul = 0.5;
	steerAheadPlan = 0.35;
	predictTurnPlan = 0.8;
	predictTurnSimul = 0.6;
	brakeDistance = 60.0;
	acceleration = 15;
	turnCoef = 0.75;
	maxSpeed = 70;
	simulation = "ship";
	thrustDelay = 2;
	overSpeedBrakeCoef = 0.2;
	enginePower = 300;
	engineShiftY = -0.1;
	waterLeakiness = 55.5;
	waterLinearDampingCoefY = 5;
	waterLinearDampingCoefX = 2.0;
	waterAngularDampingCoef = 1.2;
	waterResistanceCoef = 0.0015;
	rudderForceCoef = 0.3;
	rudderForceCoefAtMaxSpeed = 0.02;
	idleRpm = 200;
	redRpm = 1200;
	class complexGearbox
	{
		GearboxRatios[] = {"R1",-0.782,"N",0,"D1",2};
		TransmissionRatios[] = {"High",1.0};
		gearBoxMode = "auto";
		moveOffGear = 1;
		driveString = "D";
		neutralString = "N";
		reverseString = "R";
	};
	enableManualFire = 0;
	smokeLauncherGrenadeCount = 8;
	smokeLauncherVelocity = 14;
	smokeLauncherOnTurret = 0;
	smokeLauncherAngle = 360;
	weapons[] = {"SmokeLauncher"};
	magazines[] = {"SmokeLauncherMag_boat","SmokeLauncherMag_boat","SmokeLauncherMag_boat"};
	class Exhausts
	{
		class Exhaust1
		{
			position = "Exhaust1";
			direction = "Exhaust1_dir";
			effect = "";
		};
	};
	leftFastWaterEffect = "LFastWaterEffects";
	rightFastWaterEffect = "RFastWaterEffects";
	waterEffectSpeed = 5;
	engineEffectSpeed = 5;
	waterFastEffectSpeed = 10;
	driverCompartments = "Compartment1";
	cargoCompartments[] = {"Compartment1"};


	class AnimationSources
	{
		class Missiles_revolving
		{
			source = "revolving";
			weapon = "missiles_titan";
		};

		class recoil1
		{
			source = "reload";
			weapon = "autocannon_40mm_CTWS";
		};
	};
	class Turrets: Turrets
	{
		class FrontTurret: NewTurret
		{
			class HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "turretF";
					visual = "turretF";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "gunF";
					visual = "gunF";
					passThrough = 1;
				};
			};
			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			soundServo[] = {"A3\sounds_f\dummysound", db-45, 1.0};
			gunBeg = "gunF_start";
			gunEnd = "gunF_end";
			weapons[] = {"autocannon_40mm_CTWS"};
			magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_shells","40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_shells"};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200};
			discreteDistanceInitIndex = 2;
			gunnerName = "Front Gunner";
			memoryPointGunnerOptics = "gunnerview";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			gunnerCanSee = "2+8+32+4";
			startEngine = 0;
			commanding = -2;
			primaryGunner = 1;
			primaryObserver = 0;
			LODTurnedIn = 1000;
			LODTurnedOut = 1000;
			hasgunner = 1;
			proxyType = "CPGunner";
			proxyIndex = 1;
			usePip = 1;
			minElev = -10;
			maxElev = 60;
			initElev = 0;
			minTurn = -90;
			maxTurn = 90;
			initTurn = 0;
			class ViewOptics: RCWSOptics{};
			class ViewGunner: ViewOptics
			{
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
		};
	};
	class Library
	{
		libTextDesc = "$STR_A3_CfgVehicles_Boat_Armed_01_Base_Library0";
	};
	extCameraPosition[] = {0,2,-55.0};
	class Damage
	{
		tex[] = {};
		mat[] = {"A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_ext.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_ext_damage.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_ext_destruct.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_int.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_int_damage.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_int_destruct.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_ctrls.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_ctrls_damage.rvmat","A3\boat_F\Boat_Armed_01\data\Boat_Armed_01_ctrls_destruct.rvmat","a3\boat_f\Boat_Armed_01\data\staticturret_01.rvmat","A3\boat_f\Boat_Armed_01\data\StaticTurret_01_damage.rvmat","A3\boat_f\Boat_Armed_01\data\StaticTurret_01_damage.rvmat","a3\Data_F\Vehicles\Turret.rvmat","A3\Data_F\Vehicles\Turret_damage.rvmat","A3\Data_F\Vehicles\Turret_destruct.rvmat"};
	};
	class Reflectors
	{
		class Right
		{
			color[] = {0.75,0.75,0.85};
			ambient[] = {0.0005,0.0005,0.0005};
			position = "P svetlo";
			direction = "konec P svetla";
			hitpoint = "P svetlo";
			selection = "P svetlo";
			size = 1;
			innerAngle = 35;
			outerAngle = 180;
			coneFadeCoef = 40;
			intensity = 5;
			useFlare = 0;
			dayLight = 0;
			flareSize = 0.75;
			class Attenuation
			{
				start = 30;
				constant = 4.0;
				linear = 0.0;
				quadratic = 1.0;
			};
		};
		class Right2: Right
		{
			position = "PIP0_pos";
			useFlare = 1;
		};
	};
	aggregateReflectors[] = {
		{ "Right","Right2" }};
	hiddenSelections[] = {"Camo","Camo2","Camo3"};
};
class HAFM_Frigate: HAFM_Frigate_Base
{
	author = "Aplion";
	scope = 2;
	side = 2;
	model = "\HAFM_Navy\HAFM_Frigate\HAFM_Frigate";
	picture = "\A3\boat_f\Boat_Armed_01\data\ui\Boat_Armed_01_minigun.paa";
	Icon = "\A3\boat_f\Boat_Armed_01\data\ui\map_boat_armed_01_minigun.paa";
	displayName = "Frigate";

	class AnimationSources: AnimationSources{};
	class Turrets: Turrets
	{
		class FrontTurret: FrontTurret{};

		class RearTurret: NewTurret
		{
			class HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "seaturret";
					visual = "seaturret";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "seagun";
					visual = "seagun";
					passThrough = 1;
				};
			};

			stabilizedInAxes = 4;
			body = "Turret_2";
			gun = "Gun_2";
			animationSourceBody = "Turret_2";
			animationSourceGun = "Gun_2";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			gunBeg = "gun_beg";
			gunEnd = "gun_end";
			memoryPointLMissile = "gun_beg";
			memoryPointRMissile = "gun_end";
			weapons[] = {"SeaRAM_AA"};
			magazines[] = {"Searam_AA_mag"};
			gunnerName = "SeaRAM Operator";
			memoryPointGun = "Rocket_1";
			missileBeg = "gun_beg"; 
                               missileEnd = "gun_end";
			memoryPointGunnerOptics = "commanderview";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			soundServo[] = {"A3\Sounds_F\vehicles\armor\noises\servo_best",1.4125376,1.0,40};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200};
			discreteDistanceInitIndex = 2;
			gunnerOpticsEffect[] = {"TankCommanderOptics1", "BWTV"};
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			showGunnerOptics = 1;
			gunnerOutForceOptics = 1;
			forceHideGunner = 1;
			startEngine = 0;
			commanding = 2;
			gunnerCanSee = "2+8+32+4";
			primary=1;
			primaryGunner = 0;
			primaryObserver = 1;
			LODTurnedIn = 1000;
			LODTurnedOut = 1000;
			hasgunner = 1;
			proxyType = "CPGunner";
			proxyIndex = 2;
			enableManualFire = 1;
			usePip = 1;
			minElev = -10;
			maxElev = 60;
			initElev = 0;
			minTurn = -90;
			maxTurn = 90;
			initTurn = 0;
			showAllTargets = 2;
			class ViewOptics: RCWSOptics
			{
				visionMode[] = {"Normal","TI"};
			};
			class ViewGunner: ViewOptics
			{
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
			maxHorizontalRotSpeed = 1.8;
			maxVerticalRotSpeed = 1.2;
		};
	};
};

Working model.cfg

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class Vehicle: Default
{
};
class Ship: Vehicle
{
	skeletonInherit="";
	skeletonBones[]=
	{
		"otocvez",
		"",
		"otochlaven",
		"otocvez",
		"kompas",
		"",
		"fuel",
		"",
		"hodinova",
		"",
		"minutova",
		"",
		"mph",
		"",
		"rpm",
		"",
		"rpm2",
		"",
		"volant",
		"",
		"radar",
		""
	};
};
class HAFM_Frigate_skeleton: Ship
{
	isDiscrete = 1;
	skeletonInherit = "ship";
	skeletonBones[] =
	{
		"drivewheel","",
		"turretF","",
		"seaturret","",
		"radar1","",
		"radar2","",
		"recoil1","gunF",
		//"recoil2","gunF",
		"gunF","turretF",
		"seagun","seaturret"
	};
};
};
class Rotation;
class CfgModels {

class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class allvehicle: Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class Ship: allvehicle
{
	sectionsInherit="";
	sections[]=
	{
		"otocvez",
		"otochlaven",
		"radar",
		"fuel",
		"hodinova",
		"minutova",
		"mph",
		"rpm",
		"rpm2"
	};
};

class HAFM_Frigate: Ship
{
	sectionsInherit = "Ship";
	sections[] = {"gunF","turretF","seagun","seaturret"};
	skeletonName = "HAFM_Frigate_skeleton";
	class Animations {

		class DrivingWheel
		{
			type="Rotation";
			source="drivingWheel";
			selection="drivewheel";
			axis="drivewheel_axis";
			minValue=-1;
			maxValue=1;
			angle0="rad -70";
			angle1="rad 70";
		};

		class Radar1
		{
			type="rotation";
			source="time";
			selection="radar1";
			axis="radar1_axis";
			minValue=0;
			maxValue=10.500000;
			sourceAddress="loop";
			angle0=0;
			angle1="rad 360";
		};

		class Radar2
		{
			type="rotation";
			source="time";
			selection="radar2";
			axis="radar2_axis";
			minValue=0;
			maxValue=12.500000;
			sourceAddress="loop";
			angle0=0;
			angle1="rad 360";
		};

		class recoil1
		{
			type="translation";
			//source="ReloadAnim";
			source="Reload";
			memory = 1;
			animPeriod = 0;
			selection="recoil1";
			axis="recoil1_axis";
			minValue=0.85;
			maxValue=1;
			offset0=0;
			offset1=0.3;
		};
		//class recoil2: recoil1
		//{
		//	selection="recoil2";
		//	axis="recoil2_axis";
		//};

		class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="turretF";
			axis="turretF_axis";
			animPeriod=0;
			minValue="rad -90";
			maxValue="rad +90";
			angle0="rad -120";
			angle1="rad +120";
		};
		class MainGun: MainTurret
		{
			type="rotationX";
			source="mainGun";
			selection="gunF";
			axis="gunF_axis";
			minValue="rad -5";
			maxValue="rad +40";
			angle0="rad -5";
			angle1="rad +40";
		};
		class Turret_2: MainTurret
		{	
			type="rotationY";
			source="Turret_2";
			selection="seaturret";
			axis="seaturret_axis";
			animPeriod=0;
			minValue="rad -90";
			maxValue="rad +90";
			angle0=0;
			angle1="rad +360";
		};
		class Gun_2: MainGun
		{
			type="rotationX";
			source="gun_2";
			selection="seagun";
			axis="seagun_axis";
			minValue="rad -10";
			maxValue="rad +60";
			angle0="rad -10";
			angle1="rad +60";

		};
	};
};
};

NON-Working Config.cpp

#define _ARMA_

enum {
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxesxyz = 4,
stabilizedinaxisy = 2,
stabilizedinaxesboth = 3,
destructno = 0,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};

class CfgPatches
{
class HAFM_Navy
{
	units[] = {"HAFM_LandCraft"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Boat_F","HAFM_Army_Units"};
};
};

class CfgFactionClasses
{
class Hellas
{
 displayName = "Hellas";
 priority = 8;
 side = 2;
};
};

class CfgVehicleClasses
{
class Hellenic_NAVY
{
	displayName = "Hellenic NAVY";
};
};

class DefaultEventhandlers;
class RCWSOptics;

class CfgVehicles 
{
class Ship_F;
class Boat_F: Ship_F
{
	class NewTurret;
	class Turrets;
	class ViewOptics;
};

class HAFM_LandCraft_Base : Boat_F 
{
	scope = 1;
	faction = "Hellas";
	side = 2;
	crew = "GR_E_NAVY";
	mapSize = 50;
	_generalMacro = "HAFM_LandCraft";
	displayName = "$STR_A3_CFGVEHICLES_Boat_Armed_01_Base0";
	vehicleClass = "Hellenic_NAVY";
	accuracy = 0.5;
	model = "\HAFM_Navy\HAFM_LandCraft\HAFM_LandCraft.p3d";
	picture = "\A3\boat_f\Boat_Armed_01\data\ui\Boat_Armed_01_base.paa";
	Icon = "\A3\boat_f\Boat_Armed_01\data\ui\map_boat_armed_01.paa";
	unitInfoType = "UnitInfoShip";
	memoryPointsGetInDriver = "pos pilot";
	memoryPointsGetInDriverDir = "pos pilot dir";
	memoryPointsGetInCargo = "pos cargo";
	memoryPointsGetInCargoDir = "pos cargo dir";
	preciseGetInOut = 1;
	cargoPreciseGetInOut[] = {1};
	hasDriver = 1;
	hasGunner = 1;
	hasCommander = 1;
	hasCrew = 1;
	hideWeaponsDriver = 1;
	hideWeaponsCargo = 1;
	attenuationEffectType = "CarAttenuation";
	threat[] = {0.2,0.9,1};
	insideSoundCoef = 0;
	soundEngineOnInt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-start-02",0.56234133,1.0};
	soundEngineOnExt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-start-02",0.56234133,1.0,200};
	soundEngineOffInt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-stop-02",0.56234133,1.0};
	soundEngineOffExt[] = {"a3\Sounds_F\vehicles\boat\Boat_Armed_01\ext-boat-stop-02",0.56234133,1.0,200};
	buildCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_01",1.7782794,1,200};
	buildCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_02",1.7782794,1,200};
	buildCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_03",1.7782794,1,200};
	buildCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_building_04",1.7782794,1,200};
	soundBuildingCrash[] = {"buildCrash0",0.25,"buildCrash1",0.25,"buildCrash2",0.25,"buildCrash3",0.25};
	WoodCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_01",1.7782794,1,200};
	WoodCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_02",1.7782794,1,200};
	WoodCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_03",1.7782794,1,200};
	WoodCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_04",1.7782794,1,200};
	WoodCrash4[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_05",1.7782794,1,200};
	WoodCrash5[] = {"A3\sounds_f\Vehicles\soft\noises\crash_mix_wood_06",1.7782794,1,200};
	soundWoodCrash[] = {"woodCrash0",0.166,"woodCrash1",0.166,"woodCrash2",0.166,"woodCrash3",0.166,"woodCrash4",0.166,"woodCrash5",0.166};
	ArmorCrash0[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_01",1.7782794,1,200};
	ArmorCrash1[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_02",1.7782794,1,200};
	ArmorCrash2[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_03",1.7782794,1,200};
	ArmorCrash3[] = {"A3\sounds_f\Vehicles\soft\noises\crash_vehicle_04",1.7782794,1,200};
	soundArmorCrash[] = {"ArmorCrash0",0.25,"ArmorCrash1",0.25,"ArmorCrash2",0.25,"ArmorCrash3",0.25};
	class Sounds
	{
		class IdleOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-idle-2",0.5011872,1.0,300};
			frequency = "0.95	+	((rpm/	1200) factor[(100/	1200),(300/	1200)])*0.15";
			volume = "engineOn*(((rpm/	1200) factor[(0/	1200),(30/	1200)])	*	((rpm/	1200) factor[(500/	1200),(300/	1200)]))";
		};
		class Engine
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-low-2",0.63095737,1.0,450};
			frequency = "0.95	+	((rpm/	1200) factor[(300/	1200),(600/	1200)])*0.2";
			volume = "engineOn*(((rpm/	1200) factor[(150/	1200),(250/	1200)])	*	((rpm/	1200) factor[(600/	1200),(400/	1200)]))";
		};
		class EngineMidOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-mid-2",0.7943282,1.0,500};
			frequency = "0.95	+		((rpm/	1200) factor[(600/	1200),(900/	1200)])*0.2";
			volume = "engineOn*(((rpm/	1200) factor[(350/	1200),(500/	1200)])	*	((rpm/	1200) factor[(1000/	1200),(700/	1200)]))";
		};
		class EngineMaxOut
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\Boat_Armed_01\Boat_Armed_01-high-2",1.0,1.0,600};
			frequency = "0.95	+	((rpm/	1200) factor[(700/	1200),(1000/	1200)])*0.2";
			volume = "engineOn*((rpm/	1200) factor[(800/	1200),(1200/	1200)])";
		};
		class WaternoiseOutW0
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-0-speed1",0.70794576,1.0,150};
			frequency = "1";
			volume = "(speed factor[4, 1])";
		};
		class WaternoiseOutW1
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-20-speed",0.7943282,1.0,250};
			frequency = "1";
			volume = "((speed factor[2, 6]) min (speed factor[6, 4]))";
		};
		class WaternoiseOutW2
		{
			sound[] = {"A3\Sounds_F\vehicles\boat\SFX\voda-o-bok-lodi-50-speed",1.0,1.0,350};
			frequency = "1";
			volume = "(speed factor[3, 9])";
		};
	};
	class RenderTargets
	{
		class driver_display_1
		{
			renderTarget = "rendertarget0";
			class CameraView1
			{
				pointPosition = "PIP0_pos";
				pointDirection = "PIP0_dir";
				renderVisionMode = 1;
				renderQuality = 0;
				fov = 0.4;
			};
		};
		class Gunner_1
		{
			renderTarget = "rendertarget3";
			class CameraView1
			{
				pointPosition = "PIP3_pos";
				pointDirection = "PIP3_dir";
				renderVisionMode = 0;
				renderQuality = 0;
				fov = 0.5;
			};
		};
		class Gunner_2
		{
			renderTarget = "rendertarget3";
			class CameraView1
			{
				pointPosition = "PIP3_pos";
				pointDirection = "PIP3_dir";
				renderVisionMode = 2;
				renderQuality = 0;
				fov = 0.5;
			};
		};
	};
	class HitPoints
	{
		class HitBody
		{
			armor = 0.7;
			material = 50;
			name = "Haul";
			visual = "Haul";
			passThrough = 1;
		};
		class HitEngine
		{
			armor = 0.12;
			material = -1;
			name = "Engine";
			visual = "";
			passThrough = 1;
		};

	};
	driverLeftHandAnimName = "drivewheel";
	driverRightHandAnimName = "drivewheel";
	driverAction = "driver_boat01";
	getInAction = "GetInMedium";
	getOutAction = "GetOutMedium";
	cargoGetInAction[] = {"GetInMedium"};
	cargoGetOutAction[] = {"GetOutMedium"};
	castDriverShadow = 1;
	castCargoShadow = 1;
	gunnerHasFlares = 0;
	enableGPS = 1;
	transportSoldier = 4;
	cost = 100000;
	armor = 450;
	commanding = 2;

	class TransportItems
	{
		class _xx_FirstAidKit
		{
			name = "FirstAidKit";
			count = 20;
		};
		class _xx_medikit
		{
			name = "medikit";
			count = 20;
		};
	};
	supplyRadius = 10;
	precision = 15;
	steerAheadSimul = 0.5;
	steerAheadPlan = 0.35;
	predictTurnPlan = 0.8;
	predictTurnSimul = 0.6;
	brakeDistance = 60.0;
	acceleration = 10;
	turnCoef = 0.75;
	maxSpeed = 48;
	simulation = "ship";
	thrustDelay = 2;
	overSpeedBrakeCoef = 0.2;
	enginePower = 300;
	engineShiftY = -0.1;
	waterLeakiness = 55.5;
	waterLinearDampingCoefY = 5;
	waterLinearDampingCoefX = 2.0;
	waterAngularDampingCoef = 1.2;
	waterResistanceCoef = 0.0015;
	rudderForceCoef = 0.3;
	rudderForceCoefAtMaxSpeed = 0.02;
	idleRpm = 200;
	redRpm = 1200;
	class complexGearbox
	{
		GearboxRatios[] = {"R1",-0.782,"N",0,"D1",2};
		TransmissionRatios[] = {"High",1.0};
		gearBoxMode = "auto";
		moveOffGear = 1;
		driveString = "D";
		neutralString = "N";
		reverseString = "R";
	};
	enableManualFire = 0;
	smokeLauncherGrenadeCount = 8;
	smokeLauncherVelocity = 14;
	smokeLauncherOnTurret = 0;
	smokeLauncherAngle = 360;
	weapons[] = {"SmokeLauncher"};
	magazines[] = {"SmokeLauncherMag_boat","SmokeLauncherMag_boat","SmokeLauncherMag_boat"};
	class Exhausts
	{
		class Exhaust1
		{
			position = "Exhaust1";
			direction = "Exhaust1_dir";
			effect = "DamageSmokePlane";
		};
	};
	leftFastWaterEffect = "LFastWaterEffects";
	rightFastWaterEffect = "RFastWaterEffects";
	waterEffectSpeed = 5;
	engineEffectSpeed = 5;
	waterFastEffectSpeed = 20;

	driverCompartments = "Compartment1";
	cargoCompartments[] = {"Compartment1"};

	extCameraPosition[] = {0,2,-80.0};

	class AnimationSources
	{
		class recoil1
		{
			source = "reload";
			weapon = "autocannon_40mm_CTWS";
		};

		class door 
		{
			//source = "user";
			animPeriod = 3;
			//initPhase = 0;
		};
		class Framp
		{
			//source = "user";
			animPeriod = 4;
			//initPhase = 0;
		};
		class FLdoor: Framp	{animPeriod = 3;};
		class FRdoor: Framp	{animPeriod = 3;};
		class FrampF: Framp	{animPeriod = 5;};

	};

	class Turrets: Turrets
	{	
		class FrontTurret: NewTurret
		{
			class HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = 60;
					name = "turretF";
					visual = "turretF";
					passThrough = 1;
				};
				class HitGun
				{
					armor = 0.6;
					material = 60;
					name = "gunF";
					visual = "gunF";
					passThrough = 1;
				};
			};
			stabilizedInAxes = 4;
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			gunnerAction = "gunner_hunter";
			gunnerGetInAction = "GetInMedium";
			gunnerGetOutAction = "GetOutMedium";
			ejectDeadGunner = 0;
			outGunnerMayFire = 1;
			inGunnerMayFire = 1;
			soundServo[] = {"A3\sounds_f\dummysound", db-45, 1.0};
			gunBeg = "gunF_start";
			gunEnd = "gunF_end";
			weapons[] = {"autocannon_40mm_CTWS"};
			magazines[] = {"60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_shells","40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_shells"};
			discreteDistance[] = {100,200,300,400,600,800,1000,1200};
			discreteDistanceInitIndex = 2;
			gunnerName = "Front Gunner";
			memoryPointGunnerOptics = "gunnerview";
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			turretInfoType = "RscOptics_crows";
			gunnerForceOptics = 1;
			gunnerCanSee = "2+8+32+4";
			startEngine = 0;
			commanding = -2;
			primaryGunner = 1;
			primaryObserver = 0;
			LODTurnedIn = 1000;
			LODTurnedOut = 1000;
			hasgunner = 1;
			proxyType = "CPGunner";
			proxyIndex = 1;
			usePip = 1;
			minElev = -10;
			maxElev = 60;
			initElev = 0;
			minTurn = -120;
			maxTurn = 120;
			initTurn = 0;
			class ViewOptics: RCWSOptics{};
			class ViewGunner: ViewOptics
			{
				initAngleX = -15;
				minAngleX = -45;
				maxAngleX = 45;
				initFov = 0.9;
				minFov = 0.42;
				maxFov = 0.9;
				visionMode[] = {};
			};
		};	
	};

	class UserActions {

		class ParkAction
		{
			displayName="Park Vehicle";
			position="pos2";
			onlyforplayer=0;
			radius=35;
			condition="(vehicle player) != player && (vehicle player) isKindOf ""LandVehicle"" && isNull ((vehicle player) getVariable [""AplionAttached"", objNull])";
			statement= "[this, vehicle player] execVM ""\HAFM_Navy\HAFM_LandCraft\scripts\parkVehicle.sqf""";
		};

		class Openramp {
			userActionID = 101;
			displayName = "Open AFT Ramp";
			position = "RampPivot";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door"" < 0.5 && speed vehicle this < 1 && player == driver this";
			statement = "this animate [""door"", 1]";
		};

		class Closeramp {
			userActionID = 102;
			displayName = "Close AFT Ramp";
			position = "RampPivot";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door"" >= 0.5 && player == driver this";
			statement = "this animate [""door"", 0]";
		};

		class Openramp2 {
			userActionID = 103;
			displayName = "Open FWD Ramp";
			position = "Framp_axis";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""Framp"" < 0.5 && speed vehicle this < 1 && player == driver this";
			statement = "this animate [""Framp"", 1] && this animate [""FLdoor"", 1] && this animate [""FRdoor"", 1] && this animate [""FrampF"", 1]";
		};

		class Closeramp2 {
			userActionID = 104;
			displayName = "Close FWD Ramp";
			position = "Framp_axis";
			radius = 60.0;
			priority = 1.5;
			onlyForPlayer = 0;
			condition = "this animationPhase ""Framp"" >= 0.5 && player == driver this";
			statement = "this animate [""Framp"", 0] && this animate [""FLdoor"", 0] && this animate [""FRdoor"", 0] && this animate [""FrampF"", 0]";
		};

		class load_on
		{
			userActionID = 107;
			displayName = "Loading Condition ON";
			displayNameDefault = "Loading Condition";
			position = "pos2";
			priority = 1;
			radius = 50;
			animPeriod = 0.1;
			onlyForPlayer = 0;
			condition = "vehicle player == vehicle this && this animationPhase ""door"" > 0.8 && speed vehicle this < 1";
			statement = "[this,player] execVM ""\HAFM_Navy\HAFM_LandCraft\scripts\LoadProcedure.sqf""";
		};

		class Driver_pos
		{
			userActionID = 106;
			displayName = "Getin Driver Pos";
			displayNameDefault = "Getin Driver Pos";
			position = "pos2";
			priority = 1;
			radius = 40;
			animPeriod = 0.1;
			onlyForPlayer = 0;
			condition = "Vehicle Player != Vehicle this";
			statement = "player moveindriver this; this enableSimulation true";
		};
	};

	actionBegin1 = "Openramp";
	actionEnd1 = "Closeramp";
	actionBegin2 = "Openramp2";
	actionEnd2 = "Closeramp2";

	class Reflectors
	{
		class Right
		{
			color[] = {0.75,0.75,0.85};
			ambient[] = {0.0005,0.0005,0.0005};
			position = "P svetlo";
			direction = "konec P svetla";
			hitpoint = "P svetlo";
			selection = "P svetlo";
			size = 1;
			innerAngle = 35;
			outerAngle = 180;
			coneFadeCoef = 40;
			intensity = 5;
			useFlare = 0;
			dayLight = 0;
			flareSize = 0.75;
			class Attenuation
			{
				start = 30;
				constant = 4.0;
				linear = 0.0;
				quadratic = 1.0;
			};
		};
		class Right2: Right
		{
			position = "PIP0_pos";
			useFlare = 1;
		};
	};
	aggregateReflectors[] = {
		{ "Right","Right2" }};
	hiddenSelections[] = {"Camo","Camo2","Camo3"};

	class Library
	{
		libTextDesc = "$STR_A3_CfgVehicles_Boat_Armed_01_Base_Library0";
	};

	class Damage
	{
		tex[] = {};
		mat[] = {};
	};
};
class HAFM_LandCraft: HAFM_LandCraft_Base
{
	author = "Aplion";
	scope = 2;
	side = 2;
	model = "\HAFM_Navy\HAFM_LandCraft\HAFM_LandCraft.p3d";
	picture = "\A3\boat_f\Boat_Armed_01\data\ui\Boat_Armed_01_minigun.paa";
	Icon = "\A3\boat_f\Boat_Armed_01\data\ui\map_boat_armed_01_minigun.paa";
	displayName = "LandCraft_BIG";

	class AnimationSources: AnimationSources{};

	class Turrets: Turrets
	{
		class FrontTurret: FrontTurret {};

	};
};
};

NON-Working model.cfg

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class Vehicle: Default
{
};
class Ship: Vehicle
{
	skeletonInherit="";
	skeletonBones[]=
	{
		"otocvez",
		"",
		"otochlaven",
		"otocvez",
		"kompas",
		"",
		"fuel",
		"",
		"hodinova",
		"",
		"minutova",
		"",
		"mph",
		"",
		"rpm",
		"",
		"rpm2",
		"",
		"volant",
		"",
		"radar",
		""
	};
};
class HAFM_LandCraft_skeleton: Ship
{
	isDiscrete = 1;
	skeletonInherit = "ship";
	skeletonBones[] =
	{
		"haul","",
		"door","",
		"FLdoor","",
		"FRdoor","",
		"Framp","",
		"FrampF","Framp",
		"FrampF","";
		"drivewheel","",
		"radar1","",
		"radar2","",
		"turretF","",
		"gunF","turretF",
		"recoil1","gunF",
		"propR","",
		"propL","",
		"rudderR","",
		"rudderL",""

	};
};
};
class Rotation;
class CfgModels {

class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class allvehicle: Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};
class Ship: allvehicle
{
	sectionsInherit="";
	sections[]=
	{
		"otocvez",
		"otochlaven",
		"radar",
		"fuel",
		"hodinova",
		"minutova",
		"mph",
		"rpm",
		"rpm2"
	};
};

class HAFM_LandCraft: Ship
{
	sectionsInherit = "Ship";
	sections[] = {"gunF","turretF"};
	skeletonName = "HAFM_LandCraft_skeleton";
	class Animations {

		class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="turretF";
			axis="turretF_axis";
			animPeriod=0;
			minValue="rad -120";
			maxValue="rad +120";
			angle0="rad -110";
			angle1="rad +110";
		};
		class MainGun: MainTurret
		{
			type="rotationX";
			source="mainGun";
			selection="gunF";
			axis="gunF_axis";
			minValue="rad -15";
			maxValue="rad +40";
			angle0="rad -15";
			angle1="rad +40";
		};

		class recoil1
		{
			type="translation";
			//source="ReloadAnim";
			source="Reload";
			memory = 1;
			animPeriod = 0;
			selection="recoil1";
			axis="recoil1_axis";
			minValue=0.85;
			maxValue=1;
			offset0=0;
			offset1=0.3;
		};

		class Radar1
		{
			type="rotation";
			source="time";
			selection="radar1";
			axis="radar1_axis";
			minValue=0;
			maxValue=10.500000;
			sourceAddress="loop";
			angle0=0;
			angle1="rad 360";
		};

		class Radar2
		{
			type="rotation";
			source="time";
			selection="radar2";
			axis="radar2_axis";
			minValue=0;
			maxValue=12.500000;
			sourceAddress="loop";
			angle0=0;
			angle1="rad 360";
		};

		class propR
		{
			type="rotationZ";
			source="rotor";
			selection="propR";
			axis="propR_axis";
			sourceAddress="loop";
			angle0=-62.831852;
			angle1=0;
		};		

		class propL
		{
			type="rotationZ";
			source="rotor";
			selection="propL";
			axis="propL_axis";
			sourceAddress="loop";
			angle0=-62.831852;
			angle1=0;
		};		

		class door
		{
			type="rotation";
			selection="door";
			axis="RampPivot";
			animPeriod=0;
			sourceAddress="clamp";
			memory=1;	
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad 95";
		};

		class Framp
		{
			type="translation";
			sourceAddress="clamp";
			memory = 1;
			animPeriod = 0;
			selection="Framp";
			axis="Framp_axis";
			minValue=0.85;
			maxValue=1;
			offset0=0;
			offset1=-1;
		};
		class FrampF: Framp
		{
			type="rotationX";
			sourceAddress="clamp";
			memory = 1;
			animPeriod = 1;
			selection="FrampF";
			axis="FrampF_axis";
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad -77";
		};

		class FLdoor: Framp
		{
			type="rotation";
			selection="FLdoor";
			axis="FLdoor_axis";
			animPeriod=0;
			sourceAddress="clamp";
			memory=1;	
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad -30";
		};

		class FRdoor: Framp
		{
			type="rotation";
			selection="FRdoor";
			axis="FRdoor_axis";
			animPeriod=0;
			sourceAddress="clamp";
			memory=1;	
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad 30";
		};

		class DrivingWheel
		{
			type = "rotation";
			source = "drivingWheel";
			selection = "drivewheel";
			axis = "drivewheel_axis";
			memory = 0;
			angle0 = "rad -120";
			angle1 = "rad 120";
			minValue = -1;
			maxValue = 1;
		};

		class rudderR
		{
			type = "rotation";
			source = "drivingWheel";
			selection = "rudderR";
			axis = "rudderR_axis";
			memory = 0;
			angle0 = "rad -50";
			angle1 = "rad 50";
			minValue = -1;
			maxValue = 1;
		};
		class rudderL: rudderR
		{
			selection = "rudderL";
			axis = "rudderL_axis";
		};
	};
};
class misc1: HAFM_LandCraft{};
class misc2: HAFM_LandCraft{};
};

Share this post


Link to post
Share on other sites

think i got it

non working model.cfg has

1. semicolon in place of comma

"FrampF","Framp",

"FrampF","";

and you could look also at adding sources for these animations or else remming them out until the other issues are fixed.

class door

{

//source = "user";

animPeriod = 3;

//initPhase = 0;

};

class Framp

{

//source = "user";

animPeriod = 4;

//initPhase = 0;

};

class FLdoor: Framp {animPeriod = 3;};

class FRdoor: Framp {animPeriod = 3;};

class FrampF: Framp {animPeriod = 5;};

Share this post


Link to post
Share on other sites
think i got it

non working model.cfg has

1. semicolon in place of comma

and you could look also at adding sources for these animations or else remming them out until the other issues are fixed.

I've replaced the semicolon with a comma (thanks for that) plus I've added the sources in config, but this part has nothing to do with gun firing I guess ... is affecting just a ramp movement and its working fine .. after testing .. the non-firing gun issue still remains.

Share this post


Link to post
Share on other sites

ok have examined all the code and cannot see any problems, except in the first working vehicle it has a second turret with "primary=1;" - is this needed in your turret config for the non-working vehicle?

otherwise - what can't we see here?

could it be the proxy type you've used in the gunner seats?

can you outline the number of turrets in working and non-working vehicles, and which proxy type you used for each, and what proxy number each has in o2?

wondering if you might be using a bad proxy type or numbering maybe, so it doesnt allow the animation from that player proxy.

Share this post


Link to post
Share on other sites
ok have examined all the code and cannot see any problems, except in the first working vehicle it has a second turret with "primary=1;" - is this needed in your turret config for the non-working vehicle?

otherwise - what can't we see here?

could it be the proxy type you've used in the gunner seats?

can you outline the number of turrets in working and non-working vehicles, and which proxy type you used for each, and what proxy number each has in o2?

wondering if you might be using a bad proxy type or numbering maybe, so it doesnt allow the animation from that player proxy.

Well I think that "primary=1;" is used when you have more than one turret ... in my case there is only one. In any case I'll add it to my config and give it a try ...

Also the gunner proxy is exactly the same as of the working addon ... and in this case there is only one gunner proxy so the numbering is just "1".

Share this post


Link to post
Share on other sites

did you miss a selection in one of the LODs?

Share this post


Link to post
Share on other sites
did you miss a selection in one of the LODs?

These are my lods ...

Screenshot_1_zps9019d0d6.png

... all lods have everything about the turret and gun except geometry lods which don't have the "recoil1" part (I don't believe that it has any use in these lods).

Another thing I've noticed ... I've replaced the "autocannon_40mm_CTWS" and its magazines with another cannon the "autocannon_30mm_CTWS" with no luck ... but again when I tried using the "gatling_20mm" it worked !!

Edited by Aplion

Share this post


Link to post
Share on other sites

ok and is the 20mm configged as a class of mgun rather than cannon?

this is what i was on about the other day to someone about the different behaviour between a mgun and a cannon child weapon.

ah yeah i asked you this - have you tried

firedfromturret = true

this is needed for cannons where other weapons are present i think

Share this post


Link to post
Share on other sites
ok and is the 20mm configged as a class of mgun rather than cannon?

this is what i was on about the other day to someone about the different behaviour between a mgun and a cannon child weapon.

ah yeah i asked you this - have you tried

firedfromturret = true

this is needed for cannons where other weapons are present i think

"gatling_20mm" inherits from "CannonCore" class mate.

I'll try "firedfromturret = true" and I'll come back.

Share this post


Link to post
Share on other sites

ok ... I've tried everything so far ... nothing changed ... this gun still refuses to fire and I'm totally stuck ... :(

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  

×