Jump to content
Sign in to follow this  
eagledude4

Inheriting turret classes [issue]

Recommended Posts

I'm trying to reconfigure a police helicopter to add a rotatable infared camera, but I cant seem to inherit the turret classes properly.

[color="#FF0000"]class UH1_Base;
class tcg_bell206: UH1_Base[/color]
{
{
	scope = 2;
	model = "tcg_bell206\tcg_bell206.p3d";
	displayName = "Bell 206 (Santini Air)";
	Icon = "tcg_bell206\icons\bell206_icon_ca.paa";
	Picture = "tcg_bell206\icons\bell206_picture_ca.paa";
	cargoAction[] = {"Mi8_Cargo"};
	vehicleClass = "GLT_F16_ALL";
	transportSoldier = 4;
	maxSpeed = 320;
	fuelCapacity = 600;
	soundGetIn[] = {"tcg_bell206\sounds\doorclose",1,1};
	soundGetOut[] = {"tcg_bell206\sounds\doorclose",1,1,40};
	soundEngineOnInt[] = {"tcg_bell206\sounds\bell_startup",0.562341,1};
	soundEngineOnExt[] = {"\tcg_bell206\sounds\bell_startupEX",0.562341,1,700};
	soundEngineOffInt[] = {"tcg_bell206\sounds\bell_shutdown",0.562341,1};
	soundEngineOffExt[] = {"\tcg_bell206\sounds\bell_shutdownEX",0.562341,1,700};
	weapons[] = {};
	magazines[] = {};
	secondaryExplosion = 0;
	hiddenselections[] = {"defaultTexture"};
	hiddenSelectionsTextures[] = {"tcg_bell206\textures\santini.paa"};
	hasGunner = 0;
	class HitLGlass
	{
		armor = 0.1;
		material = -1;
		name = "glass1";
		visual = "glass1";
		passThrough = 0;
	};
	class HitRGlass
	{
		armor = 0.1;
		material = -1;
		name = "glass2";
		visual = "glass2";
		passThrough = 0;
	};
	dammageHalf[] = {"tcg_bell206\textures\bell206_glass_ca.paa","tcg_bell206\textures\glassbr_ca.paa"};
	dammageFull[] = {"tcg_bell206\textures\bell206_glass_ca.paa","tcg_bell206\textures\glassbr_ca.paa"};
	class Damage
	{
		tex[] = {};
		mat[] = {"tcg_bell206\textures\bell206_1.rvmat","ca\air2\uh1y\data\uh1y_sklo_damage.rvmat","ca\air2\uh1y\data\uh1y_sklo_damage.rvmat"};
	};
	[color="#FF0000"][color="#FF0000"]class Turrets
	{
		class MainTurret
		{
			body = "mainTurret";
			gun = "mainGun";
			minElev = -60;
			maxElev = 30;
			initElev = 0;
			minTurn = -5;
			maxTurn = 185;
			initTurn = 0;
			soundServo[] = {"",0.01,1.0};
			animationSourceHatch = "";
			stabilizedInAxes = "StabilizedInAxesNone";
			gunBeg = "muzzle_1";
			gunEnd = "chamber_1";
			weapons[] = {"M134"};
			magazines[] = {"2000Rnd_762x51_M134"};
			gunnerName = "$STR_POSITION_CREWCHIEF";
			gunnerOpticsModel = "\ca\weapons\optika_empty";
			gunnerOutOpticsShowCursor = 1;
			gunnerOpticsShowCursor = 1;
			gunnerAction = "UH1Y_Gunner";
			gunnerInAction = "UH1Y_Gunner";
			commanding = -2;
			primaryGunner = 1;
			class ViewOptics
			{
				initAngleX = 0;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = -100;
				maxAngleY = 100;
				initFov = 0.7;
				minFov = 0.25;
				maxFov = 1.1;
			};
			gunnerCompartments = "Compartment2";
		};
		class CoPilotObs: MainTurret
		{
			stabilizedInAxes = "StabilizedInAxesBoth";
			proxyIndex = 3;
			gunnerName = "$STR_GN_UH1Y_CoPilotObs";
			gunnerAction = "UH1Y_Gunner02";
			gunnerInAction = "UH1Y_Gunner02";
			body = "ObsTurret";
			gun = "ObsGun";
			animationSourceBody = "ObsTurret";
			animationSourceGun = "ObsGun";
			outGunnerMayFire = 1;
			gunBeg = "gun_end";
			gunEnd = "gun_begin";
			memoryPointGun = "gun_end";
			commanding = -1;
			weapons[] = {"Laserdesignator_mounted"};
			magazines[] = {"Laserbatteries"};
			primaryGunner = 0;
			minElev = -80;
			maxElev = 25;
			initElev = 0;
			minTurn = -180;
			maxTurn = 180;
			initTurn = 0;
			gunnerOpticsModel = "\ca\weapons\optika_SOFLAM";
			memoryPointGunnerOptics = "commanderview";
			gunnerForceOptics = 0;
			gunnerOpticsShowCursor = 0;
			class ViewOptics
			{
				initAngleX = 0;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = -100;
				maxAngleY = 100;
				initFov = 0.8;
				minFov = 0.0083;
				maxFov = 0.8;
			};
			gunnerCompartments = "Compartment2";
			startEngine = 0;
			soundServo[] = {"",0.01,1.0};
			memoryPointsGetInGunner = "pos codriver";
			memoryPointsGetInGunnerDir = "pos codriver dir";
			selectionFireAnim = "";
			castGunnerShadow = 1;
			viewGunnerShadow = 1;
		};
	};[/color][/color]
	class Sounds
	{
		class Engine
		{
			sound[] = {"\tcg_bell206\sounds\bell_rotor_ext",7.511886,1.0,1300};
			frequency = "rotorSpeed";
			volume = "camPos*((rotorSpeed-0.92)*8)";
		};
		class RotorLowOut
		{
			sound[] = {"\tcg_bell206\sounds\bell_rotor_lowEX",2.511886,1.0,1400};
			frequency = "rotorSpeed";
			volume = "camPos*(0 max (rotorSpeed-0.1))";
			cone[] = {1.6,3.14,2.0,0.5};
		};
		class RotorHighOut
		{
			sound[] = {"\tcg_bell206\sounds\bell206_rotor_high_x",1.51189,1.0,1600};
			frequency = "rotorSpeed";
			volume = "camPos*10*(0 max (rotorThrust-1.2))";
			cone[] = {1.6,3.14,2.0,0.5};
		};
		class EngineIn
		{
			sound[] = {"\tcg_bell206\sounds\bell206_interior",3.162278,1.0};
			frequency = "rotorSpeed";
			volume = "(1-camPos)*((rotorSpeed-0.75)*4)";
		};
		class RotorLowIn
		{
			sound[] = {"\tcg_bell206\sounds\bell206_rotor_low",3.162278,1.0};
			frequency = "rotorSpeed";
			volume = "2*(1-camPos)*((rotorSpeed factor[0.3, 1.1]) min (rotorSpeed factor[1.1, 0.3]))";
		};
		class RotorHighIn
		{
			sound[] = {"\tcg_bell206\sounds\bell206_rotor_high",7.943283,1.0};
			frequency = "rotorSpeed";
			volume = "(1-camPos)*3*(rotorThrust-0.9)";
		};
	};
	class Reflectors
	{
		class Left
		{
			color[] = {0.5,0.8,1.0,1.0};
			ambient[] = {0.07,0.07,0.07,1.0};
			position = "LandLeft";
			direction = "LandLeftDir";
			hitpoint = "LandLeft";
			selection = "LandLeft";
			size = 1;
			brightness = 0.7;
		};
		class Right
		{
			color[] = {0.5,0.8,1.0,1.0};
			ambient[] = {0.07,0.07,0.07,1.0};
			position = "LandRight";
			direction = "LandRightDir";
			hitpoint = "LandRight";
			selection = "LandRight";
			size = 1;
			brightness = 0.7;
		};
	};
	class MarkerLights
	{
		class NavRed
		{
			name = "NavRed";
			color[] = {1.0,0.1,0.1,1};
			ambient[] = {0.1,0.01,0.01,1};
			brightness = 0.01;
			size = 0.2;
			blinking = "false";
		};
		class NavGreen: NavRed
		{
			name = "NavGreen";
			color[] = {0.1,1.0,0.1,1};
			ambient[] = {0.01,0.1,0.01,1};
		};
		class NavWhite: NavRed
		{
			name = "NavWhite";
			color[] = {1.0,1.0,1.0,1};
			ambient[] = {0.1,0.1,0.1,1};
		};
		class BeaconRed1
		{
			name = "BeaconRed1";
			color[] = {1.0,0.1,0.1,1};
			ambient[] = {0.1,0.01,0.01,1};
			brightness = 0.01;
			size = 0.2;
			blinking = "true";
		};
	};
	class AnimationSources{};
	class UserActions{};
};

I'm getting no entry errors for my turret classes

Share this post


Link to post
Share on other sites

Something like this maybe

class Helicopter;
class UH1_Base: Helicopter
{
	class Turrets;
	class MainTurret;
};
class tcg_bell206: UH1_Base
{
....
....
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{

Share this post


Link to post
Share on other sites

Thanks, it works. Problem is the helicopter doesnt have a gunner memory point :P

Edited by eagledude4

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  

×