Jump to content
Sign in to follow this  
omfgitsst6

APC Turret

Recommended Posts

After much trial and error, I've come to the conclusion that I have no idea what I'm doing anymore. I'm trying to add a retextured OPFOR APC to my mod, but the turret does not want to cooperate. After spending two hours defining base classes, I finally got it to load into the game, but there is only a driver and the RCWS turret is just a lovely decoration on the roof.

	class O_APC_Tracked_02_base_F;
class WeaponFireGun;
class WeaponCloudsGun;
class WeaponFireMGun;
class WeaponCloudsMGun;
class RCWSOptics;
class Optics_Armored;
class Optics_Commander_02;
class wide;
class medium;
class narrow;
class Optics_Gunner_MBT_02;

class Pan_Army_APC_Tracked: O_APC_Tracked_02_base_F {

	class SpeechVariants {

		class Default {
			speechSingular[] = {"veh_vehicle_APC_s"};
			speechPlural[] = {"veh_vehicle_APC_p"};
		};
	};
	textSingular = "$STR_A3_nameSound_veh_vehicle_APC_s";
	textPlural = "$STR_A3_nameSound_veh_vehicle_APC_p";
	nameSound = "veh_vehicle_APC_s";
	author = "$STR_A3_Bohemia_Interactive";
	_generalMacro = "O_APC_Tracked_02_base_F";
	scope = 2;
	side = 2;
	faction = "Panzara";
	displayname = "Army BTR-K";
	picture = "\A3\armor_f_beta\APC_Tracked_02\Data\UI\APC_Tracked_02_cannon_ca.paa";
	Icon = "\A3\armor_f_beta\APC_Tracked_02\Data\UI\map_APC_Tracked_02_cannon_ca.paa";
	crew = "Git_Panzaran_Soldier10";
	typicalCargo[] = {"Git_Panzaran_Soldier10"};

	class Turrets {

		class MainTurret {
			/*extern*/ class ViewGunner;

			class Turrets {

				class CommanderOptics {
					memoryPointGunnerOutOptics = "commanderview";
					memoryPointGunnerOptics = "commanderview";
					minElev = -25;
					maxElev = 60;
					initElev = 0;
					minTurn = -360;
					maxTurn = 360;
					initTurn = 0;
					weapons[] = {"SmokeLauncher"};
					magazines[] = {"SmokeLauncherMag"};
					soundServo[] = {"A3\sounds_f\dummysound", 0.010000, 1.000000, 30};
					outGunnerMayFire = 0;
					inGunnerMayFire = 1;
					forceHideGunner = 1;
					gunnerAction = "crew_tank01_out";
					gunnerInAction = "crew_tank01_in";
					gunnerGetInAction = "GetInAMV_cargo";
					gunnerGetOutAction = "GetOutLow";
					gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Commander_OPFOR_F";
					gunnerOutOpticsModel = "";
					gunnerOpticsEffect[] = {};

					class ViewGunner: ViewGunner {
					};

					class ViewOptics: RCWSOptics {
					};

					class OpticsIn: Optics_Commander_02 {

						class Wide: Wide {
						};

						class Medium: Medium {
						};

						class Narrow: Narrow {
						};
					};
					turretInfoType = "RscOptics_MBT_02_commander";
					startEngine = 0;

					class HitPoints {

						class HitTurret {
							armor = 0.200000;
							material = -1;
							name = "commander_turret_hit";
							visual = "commander_turret_hit";
							passThrough = 0;
							minimalHit = 0.100000;
							explosionShielding = 0.400000;
							radius = 0.200000;
						};

						class HitGun {
							armor = 0.200000;
							material = -1;
							name = "commander_gun_hit";
							visual = "commander_gun_hit";
							passThrough = 0;
							minimalHit = 0.100000;
							explosionShielding = 0.400000;
							radius = 0.200000;
						};
					};
					stabilizedInAxes = 3;
					gunnerHasFlares = 1;
					maxHorizontalRotSpeed = 1.800000;
					maxVerticalRotSpeed = 1.800000;
					viewGunnerInExternal = 1;
				};
			};
			body = "mainTurret";
			gun = "mainGun";
			weapons[] = {"LMG_M200"};
			magazines[] = {"2000Rnd_65x39_belt", "2000Rnd_65x39_belt"};
			soundServo[] = {"A3\sounds_f\dummysound", 0.010000, 1.000000, 10};
			minElev = -16;
			maxElev = 36;
			gunnerAction = "apctracked2_slot1_out";
			gunnerInAction = "apctracked2_slot1_in";
			gunnerGetInAction = "GetInAMV_cargo";
			gunnerGetOutAction = "GetOutLow";
			viewGunnerInExternal = 1;
			castGunnerShadow = 1;
			forceHideGunner = 1;
			stabilizedInAxes = 3;
			gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Gunner_02_F";
			gunnerOutOpticsModel = "";
			discreteDistance[] = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500};
			discreteDistanceInitIndex = 2;
			memoryPointGunnerOptics = "gunnerview";
			selectionFireAnim = "zasleh2";

			class ViewOptics: RCWSOptics {
				visionMode[] = {"Normal", "TI"};
			};

			class OpticsIn: Optics_Gunner_MBT_02 {

				class Wide: Wide {
				};

				class Medium: Medium {
				};

				class Narrow: Narrow {
				};
			};
			turretInfoType = "RscOptics_MBT_02_gunner";

			class HitPoints {

				class HitTurret {
					armor = 0.600000;
					material = -1;
					name = "main_turret_hit";
					visual = "main_turret_hit";
					passThrough = 0.200000;
					minimalHit = 0.100000;
					explosionShielding = 0.200000;
					radius = 0.300000;
				};

				class HitGun {
					armor = 0.300000;
					material = -1;
					name = "main_gun_hit";
					visual = "main_gun_hit";
					passThrough = 0;
					minimalHit = 0.100000;
					explosionShielding = 0.400000;
					radius = 0.150000;
				};
			};
		};
	};
	threat[] = {1, 0.800000, 0.300000};
	transportSoldier = 8;

	class AnimationSources {

		class muzzle_rot {
			source = "ammorandom";
			weapon = "autocannon_30mm_CTWS";
		};

		class muzzle_hide {
			source = "reload";
			weapon = "autocannon_30mm_CTWS";
		};

		class Missiles_revolving {
			source = "revolving";
			weapon = "missiles_titan";
		};
	};
	selectionFireAnim = "";
	hiddenSelections[] = {"camo1", "camo2", "camo3"};
	hiddenSelectionsTextures[] = {"Git_Panzara\BTR\Tracked\Pan_apc_tracked_ext_01.paa", "Git_Panzara\BTR\Tracked\Pan_apc_tracked_ext_02.paa", "Git_Panzara\BTR\Tracked\Pan_apc_rcws30.paa"};
};

Share this post


Link to post
Share on other sites

try

class MainTurret:NewTurret {...}

other then that, it could also be a model.cfg or memory LOD issue

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  

×