Jump to content
Sign in to follow this  
m1lkm8n

animations inside a vehicle help

Recommended Posts

hey guys. so we have animated the crane from a2 by turning it into a tank_f class and I need some help trying to get other animations working.

currently the boom and the hookpully system work by way of classing them as the gunner turret. but I wanted the hook to be able to drop down via a useraction. now the anim works in bulldozer but for whatever reason it wont in game even tho im fairly sure my config is correct.

secondly is there a way I have the gunner turn the crane off and on or must he be the driver?

heres the video

main config:

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 ConstructionCrane
{
	units[] = {"Jbad_CraneCon"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Weapons_F","A3_Static_F","A3_Armor_F"};
};
};
class CfgVehicles
{
class LandVehicle;
class Tank: LandVehicle
{
	class NewTurret;
	class Sounds;
	class HitPoints;
};
class Tank_F: Tank
{
	class Turrets
	{
		class MainTurret: NewTurret
		{
			class Turrets
			{
				class CommanderOptics;
			};
		};
	};
	class AnimationSources;
	class ViewPilot;
	class ViewOptics;
	class ViewCargo;
	class HeadLimits;
	class HitPoints: HitPoints
	{
		class HitHull;
		class HitEngine;
		class HitLTrack;
		class HitRTrack;
	};
	class Sounds: Sounds
	{
		class Engine;
		class Movement;
	};
};
	class Jbad_CraneCon: Tank_F
{
	author = "M1lkm8n&SmokeDog";
	displayname = "Contruction Crane";
	model = "\jbad_structures\constructioncrane\jbad_cranecon";
	picture = "\A3\armor_f_gamma\MBT_01\Data\UI\Slammer_M2A1_Base_ca.paa";
	Icon = "\A3\armor_f_gamma\MBT_01\Data\ui\map_slammer_mk4_ca.paa";
	simulation = "tankX";
	enginePower = 1118;
	maxOmega = 276;
	peakTorque = 4832;
	torqueCurve[] = {{ "(700/2640)",0 },{ "(1600/2640)","(2650/2850)" },{ "(1800/2640)","(2800/2850)" },{ "(1900/2640)","(2850/2850)" },{ "(2000/2640)","(2800/2850)" },{ "(2200/2640)","(2750/2850)" },{ "(2400/2640)","(2600/2850)" },{ "(2640/2640)","(2350/2850)" }};
	thrustDelay = 0.2;
	clutchStrength = 90.0;
	fuelCapacity = 1885;
	brakeIdleSpeed = 1.78;
	latency = 0.1;
	tankTurnForce = 1700000;
	normalSpeedForwardCoef = 0.4;
	idleRpm = 700;
	redRpm = 2640;
	engineLosses = 25;
	transmissionLosses = 15;
	changeGearMinEffectivity[] = {0.5,0.15,0.95,0.95,0.95,0.95,0.95,0.95,0.95,0.95,0.95,0.95,0.9,0.9,0.9,0.9,0.9};
	class complexGearbox
	{
		GearboxRatios[] = {"R1",-2.235,"N",0,"CD0","2*(0.75^(-10))","CD1","2*(0.75^(-9))","CD2","2*(0.75^(-8))","CD3","2*(0.75^(-7))","CD4","2*(0.75^(-6))","CD5","2*(0.75^(-5))","CD6","2*(0.75^(-4))","CD7","2*(0.75^(-3))","CD8","2*(0.75^(-2))","CD9","2*(0.75^(-1))","D1","2*(0.75^0)","D2","2*(0.75^1)","D3","2*(0.75^2)","D4","2*(0.75^3)","D5","2*(0.75^4)"};
		TransmissionRatios[] = {"High",10};
		gearBoxMode = "auto";
		moveOffGear = 1;
		driveString = "D";
		neutralString = "N";
		reverseString = "R";
		transmissionDelay = 0;
	};
	class Wheels{};
	scope = 2;
	maxSpeed = 60;
	steerAheadSimul = 0.5;
	steerAheadPlan = 0.35;
	predictTurnPlan = 2.8;
	predictTurnSimul = 2.6;
	brakeDistance = 15;
	precision = 5;
	transportSoldier = 0;
	cargoGetInAction[] = {"GetInMortar"};
	cargoGetOutAction[] = {"GetOutLow"};
	cargoAction[] = {"Mortar_Gunner"};
	cargoIsCoDriver[] = {true};
	memoryPointsGetInCargo[] = {"pos gunner"};
	memoryPointsGetInCargoDir[] = {"pos gunner dir"};
	maxFordingDepth = 0;
	waterResistance = 0;
	waterDamageEngine = 0.2;
	driverAction = "";
	driverInAction = "";
	extCameraPosition[] = {0,2.25,-9};
	forceHideDriver = 1;
	/*class ViewOptics: ViewOptics
	{
		visionMode[] = {"Normal"};
	};*/
	armor = 700;
	armorStructural = 6;
	damageResistance = 0.00547;
	cost = 2500000;
	crewVulnerable = 0;
	epeImpulseDamageCoef = 18;
	waterPPInVehicle = 0;
	wheelCircumference = 2.15;
	tracksSpeed = 1.4;
	hideWeaponsDriver = 1;
	hideWeaponsCargo = 1;
	class HitPoints: HitPoints{};
	animationSourceHatch = "";
	class Exhausts
	{
		class Exhaust1
		{
			position = "exhaust";
			direction = "exhaust_dir";
			effect = "ExhaustEffectTankSide";
		};
	};
	insideSoundCoef = 0.9;
	threat[] = {1,1,0.3};
	attenuationEffectType = "TankAttenuation";
	soundGetIn[] = {"A3\sounds_f\vehicles\armor\noises\get_in_out",0.56234133,1};
	soundGetOut[] = {"A3\sounds_f\vehicles\armor\noises\get_in_out",0.56234133,1,20};
	soundDammage[] = {"",0.56234133,1};
	soundEngineOnInt[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_start",0.63095737,1.0};
	soundEngineOnExt[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_start",0.7943282,1.0,200};
	soundEngineOffInt[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_stop",0.63095737,1.0};
	soundEngineOffExt[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_stop",0.7943282,1.0,200};
	class Sounds
	{
		class Idle_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm1",0.7943282,1,200};
			frequency = "0.95	+	((rpm/	2640) factor[(400/	2640),(900/	2640)])*0.15";
			volume = "engineOn*camPos*(((rpm/	2640) factor[(100/	2640),(200/	2640)])	*	((rpm/	2640) factor[(900/	2640),(700/	2640)]))";
		};
		class Engine
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm2",0.8912509,1,240};
			frequency = "0.8	+	((rpm/	2640) factor[(700/	2640),(1100/	2640)])*0.2";
			volume = "engineOn*camPos*(((rpm/	2640) factor[(705/	2640),(850/	2640)])	*	((rpm/	2640) factor[(1100 /	2640),(950/	2640)]))";
		};
		class Engine1_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm3",1.1220185,1,280};
			frequency = "0.8	+	((rpm/	2640) factor[(950/	2640),(1400/	2640)])*0.2";
			volume = "engineOn*camPos*(((rpm/	2640) factor[(900/	2640),(1050/	2640)])	*	((rpm/	2640) factor[(1400/	2640),(1200/	2640)]))";
		};
		class Engine2_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm4",1.2589254,1,320};
			frequency = "0.8	+	((rpm/	2640) factor[(1200/	2640),(1700/	2640)])*0.2";
			volume = "engineOn*camPos*(((rpm/	2640) factor[(1170/	2640),(1380/	2640)])	*	((rpm/	2640) factor[(1700/	2640),(1500/	2640)]))";
		};
		class Engine3_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm5",1.4125376,1,360};
			frequency = "0.8	+	((rpm/	2640) factor[(1500/	2640),(2100/	2640)])*0.1";
			volume = "engineOn*camPos*(((rpm/	2640) factor[(1500/	2640),(1670/	2640)])	*	((rpm/	2640) factor[(2100/	2640),(1800/	2640)]))";
		};
		class Engine4_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm6",1.5848932,1,400};
			frequency = "0.8	+	((rpm/	2640) factor[(1800/	2640),(2300/	2640)])*0.1";
			volume = "engineOn*camPos*(((rpm/	2640) factor[(1780/	2640),(2060/	2640)])	*	((rpm/	2640) factor[(2450/	2640),(2200/	2640)]))";
		};
		class Engine5_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_ext_rpm7",1.7782794,1,440};
			frequency = "0.8	+	((rpm/	2640) factor[(2100/	2640),(2640/	2640)])*0.1";
			volume = "engineOn*camPos*((rpm/	2640) factor[(2150/	2640),(2500/	2640)])";
		};
		class IdleThrust
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm1",1.1220185,1,200};
			frequency = "0.8	+	((rpm/	2640) factor[(400/	2640),(900/	2640)])*0.15";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(100/	2640),(200/	2640)])	*	((rpm/	2640) factor[(900/	2640),(700/	2640)]))";
		};
		class EngineThrust
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm2",1.4125376,1,200};
			frequency = "0.8	+	((rpm/	2640) factor[(700/	2640),(1100/	2640)])*0.2";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(705/	2640),(850/	2640)])	*	((rpm/	2640) factor[(1100 /	2640),(950/	2640)]))";
		};
		class Engine1_Thrust_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm3",1.7782794,1,230};
			frequency = "0.8	+	((rpm/	2640) factor[(950/	2640),(1400/	2640)])*0.2";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(900/	2640),(1050/	2640)])	*	((rpm/	2640) factor[(1400/	2640),(1200/	2640)]))";
		};
		class Engine2_Thrust_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm4",1.9952624,1,290};
			frequency = "0.8	+	((rpm/	2640) factor[(1200/	2640),(1700/	2640)])*0.2";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(1170/	2640),(1380/	2640)])	*	((rpm/	2640) factor[(1700/	2640),(1500/	2640)]))";
		};
		class Engine3_Thrust_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm5",1.7782794,1,350};
			frequency = "0.8	+	((rpm/	2640) factor[(1500/	2640),(2100/	2640)])*0.1";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(1500/	2640),(1670/	2640)])	*	((rpm/	2640) factor[(2100/	2640),(1800/	2640)]))";
		};
		class Engine4_Thrust_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm6",2.2387211,1,400};
			frequency = "0.8	+	((rpm/	2640) factor[(1800/	2640),(2300/	2640)])*0.1";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(1780/	2640),(2060/	2640)])	*	((rpm/	2640) factor[(2450/	2640),(2200/	2640)]))";
		};
		class Engine5_Thrust_ext
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_ext_rpm7",2.5118864,1,450};
			frequency = "0.8	+	((rpm/	2640) factor[(2100/	2640),(2640/	2640)])*0.1";
			volume = "engineOn*camPos*(0.4+(0.6*(thrust factor[0.1,1])))*((rpm/	2640) factor[(2150/	2640),(2500/	2640)])";
		};
		class Idle_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm1",0.5011872,1};
			frequency = "0.8	+	((rpm/	2640) factor[(400/	2640),(900/	2640)])*0.15";
			volume = "engineOn*(1-camPos)*(((rpm/	2640) factor[(100/	2640),(200/	2640)])	*	((rpm/	2640) factor[(900/	2640),(700/	2640)]))";
		};
		class Engine_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm2",0.35481337,1};
			frequency = "0.8	+	((rpm/	2640) factor[(700/	2640),(1100/	2640)])*0.2";
			volume = "engineOn*(1-camPos)*(((rpm/	2640) factor[(705/	2640),(850/	2640)])	*	((rpm/	2640) factor[(1100 /	2640),(950/	2640)]))";
		};
		class Engine1_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm3",0.39810717,1};
			frequency = "0.8	+	((rpm/	2640) factor[(950/	2640),(1400/	2640)])*0.2";
			volume = "engineOn*(1-camPos)*(((rpm/	2640) factor[(900/	2640),(1050/	2640)])	*	((rpm/	2640) factor[(1400/	2640),(1200/	2640)]))";
		};
		class Engine2_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm4",0.4466836,1};
			frequency = "0.8	+	((rpm/	2640) factor[(1200/	2640),(1700/	2640)])*0.2";
			volume = "engineOn*(1-camPos)*(((rpm/	2640) factor[(1170/	2640),(1380/	2640)])	*	((rpm/	2640) factor[(1700/	2640),(1500/	2640)]))";
		};
		class Engine3_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm5",0.5011872,1};
			frequency = "0.8	+	((rpm/	2640) factor[(1500/	2640),(2100/	2640)])*0.1";
			volume = "engineOn*(1-camPos)*(((rpm/	2640) factor[(1500/	2640),(1670/	2640)])	*	((rpm/	2640) factor[(2100/	2640),(1800/	2640)]))";
		};
		class Engine4_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm6",0.56234133,1};
			frequency = "0.8	+	((rpm/	2640) factor[(1800/	2640),(2300/	2640)])*0.1";
			volume = "engineOn*(1-camPos)*(((rpm/	2640) factor[(1780/	2640),(2060/	2640)])	*	((rpm/	2640) factor[(2450/	2640),(2200/	2640)]))";
		};
		class Engine5_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_engine_int_rpm7",0.63095737,1};
			frequency = "0.8	+	((rpm/	2640) factor[(2100/	2640),(2640/	2640)])*0.1";
			volume = "engineOn*(1-camPos)*((rpm/	2640) factor[(2150/	2640),(2500/	2640)])";
		};
		class IdleThrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm1",0.63095737,1};
			frequency = "0.8	+	((rpm/	2640) factor[(400/	2640),(900/	2640)])*0.15";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(100/	2640),(200/	2640)])	*	((rpm/	2640) factor[(900/	2640),(700/	2640)]))";
		};
		class EngineThrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm2",0.39810717,1};
			frequency = "0.8	+	((rpm/	2640) factor[(700/	2640),(1100/	2640)])*0.2";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(705/	2640),(850/	2640)])	*	((rpm/	2640) factor[(1100 /	2640),(950/	2640)]))";
		};
		class Engine1_Thrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm3",0.4466836,1};
			frequency = "0.8	+	((rpm/	2640) factor[(950/	2640),(1400/	2640)])*0.2";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(900/	2640),(1050/	2640)])	*	((rpm/	2640) factor[(1400/	2640),(1200/	2640)]))";
		};
		class Engine2_Thrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm4",0.4466836,1};
			frequency = "0.8	+	((rpm/	2640) factor[(1200/	2640),(1700/	2640)])*0.2";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(1170/	2640),(1380/	2640)])	*	((rpm/	2640) factor[(1700/	2640),(1500/	2640)]))";
		};
		class Engine3_Thrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm5",0.5011872,1};
			frequency = "0.8	+	((rpm/	2640) factor[(1500/	2640),(2100/	2640)])*0.1";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(1500/	2640),(1670/	2640)])	*	((rpm/	2640) factor[(2100/	2640),(1800/	2640)]))";
		};
		class Engine4_Thrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm6",0.56234133,1};
			frequency = "0.8	+	((rpm/	2640) factor[(1800/	2640),(2300/	2640)])*0.1";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*(((rpm/	2640) factor[(1780/	2640),(2060/	2640)])	*	((rpm/	2640) factor[(2450/	2640),(2200/	2640)]))";
		};
		class Engine5_Thrust_int
		{
			sound[] = {"A3\Sounds_F\vehicles\armor\MBT_01\MBT1_exhaust_int_rpm7",0.63095737,1};
			frequency = "0.8	+	((rpm/	2640) factor[(2100/	2640),(2640/	2640)])*0.1";
			volume = "engineOn*(1-camPos)*(0.4+(0.6*(thrust factor[0.1,1])))*((rpm/	2640) factor[(2150/	2640),(2500/	2640)])";
		};
		class NoiseInt
		{
			sound[] = {"A3\sounds_f\vehicles\armor\noises\noise_tank_int_1",0.5011872,1.0};
			frequency = "1";
			volume = "(1-camPos)*(angVelocity max 0.04)*(speed factor[4, 15])";
		};
		class NoiseExt
		{
			sound[] = {"A3\sounds_f\vehicles\armor\noises\noise_tank_ext_1",0.8912509,1.0,50};
			frequency = "1";
			volume = "camPos*(angVelocity max 0.04)*(speed factor[4, 15])";
		};
		class ThreadsOutH0
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_hard_01",0.39810717,1.0,140};
			frequency = "1";
			volume = "engineOn*camPos*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-0) max 0)/	60),(((-5) max 5)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-15) max 15)/	60),(((-10) max 10)/	60)]))";
		};
		class ThreadsOutH1
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_hard_02",0.4466836,1.0,160};
			frequency = "1";
			volume = "engineOn*camPos*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-10) max 10)/	60),(((-15) max 15)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-30) max 30)/	60),(((-25) max 25)/	60)]))";
		};
		class ThreadsOutH2
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_hard_03",0.5011872,1.0,180};
			frequency = "1";
			volume = "engineOn*camPos*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-25) max 25)/	60),(((-30) max 30)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-45) max 45)/	60),(((-40) max 40)/	60)]))";
		};
		class ThreadsOutH3
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_hard_04",0.56234133,1.0,200};
			frequency = "1";
			volume = "engineOn*camPos*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-40) max 40)/	60),(((-45) max 45)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-55) max 55)/	60),(((-50) max 50)/	60)]))";
		};
		class ThreadsOutH4
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_hard_05",0.56234133,1.0,220};
			frequency = "1";
			volume = "engineOn*camPos*(1-grass)*((((-speed*3.6) max speed*3.6)/	60) factor[(((-49) max 49)/	60),(((-53) max 53)/	60)])";
		};
		class ThreadsOutS0
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_soft_01",0.31622776,1.0,120};
			frequency = "1";
			volume = "engineOn*(camPos)*(grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-0) max 0)/	60),(((-5) max 5)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-15) max 15)/	60),(((-10) max 10)/	60)]))";
		};
		class ThreadsOutS1
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_soft_02",0.35481337,1.0,140};
			frequency = "1";
			volume = "engineOn*(camPos)*(grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-10) max 10)/	60),(((-15) max 15)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-30) max 30)/	60),(((-25) max 25)/	60)]))";
		};
		class ThreadsOutS2
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_soft_03",0.39810717,1.0,160};
			frequency = "1";
			volume = "engineOn*(camPos)*(grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-25) max 25)/	60),(((-30) max 30)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-45) max 45)/	60),(((-40) max 40)/	60)]))";
		};
		class ThreadsOutS3
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_soft_04",0.4466836,1.0,180};
			frequency = "1";
			volume = "engineOn*(camPos)*(grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-40) max 40)/	60),(((-45) max 45)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-55) max 55)/	60),(((-50) max 50)/	60)]))";
		};
		class ThreadsOutS4
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_ext_treads_soft_05",0.5011872,1.0,200};
			frequency = "1";
			volume = "engineOn*(camPos)*(grass)*((((-speed*3.6) max speed*3.6)/	60) factor[(((-49) max 49)/	60),(((-53) max 53)/	60)])";
		};
		class ThreadsInH0
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_hard_01",0.25118864,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-0) max 0)/	60),(((-5) max 5)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-15) max 15)/	60),(((-10) max 10)/	60)]))";
		};
		class ThreadsInH1
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_hard_02",0.2818383,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-10) max 10)/	60),(((-15) max 15)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-30) max 30)/	60),(((-25) max 25)/	60)]))";
		};
		class ThreadsInH2
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_hard_03",0.31622776,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-25) max 25)/	60),(((-30) max 30)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-45) max 45)/	60),(((-40) max 40)/	60)]))";
		};
		class ThreadsInH3
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_hard_04",0.35481337,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(1-grass)*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-40) max 40)/	60),(((-45) max 45)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-55) max 55)/	60),(((-50) max 50)/	60)]))";
		};
		class ThreadsInH4
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_hard_05",0.39810717,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*(1-grass)*((((-speed*3.6) max speed*3.6)/	60) factor[(((-49) max 49)/	60),(((-53) max 53)/	60)])";
		};
		class ThreadsInS0
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_soft_01",0.31622776,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*grass*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-0) max 0)/	60),(((-5) max 5)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-15) max 15)/	60),(((-10) max 10)/	60)]))";
		};
		class ThreadsInS1
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_soft_02",0.31622776,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*grass*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-10) max 10)/	60),(((-15) max 15)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-30) max 30)/	60),(((-25) max 25)/	60)]))";
		};
		class ThreadsInS2
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_soft_03",0.35481337,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*grass*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-25) max 25)/	60),(((-30) max 30)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-45) max 45)/	60),(((-40) max 40)/	60)]))";
		};
		class ThreadsInS3
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_soft_04",0.35481337,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*grass*(((((-speed*3.6) max speed*3.6)/	60) factor[(((-40) max 40)/	60),(((-45) max 45)/	60)])	*	((((-speed*3.6) max speed*3.6)/	60) factor[(((-55) max 55)/	60),(((-50) max 50)/	60)]))";
		};
		class ThreadsInS4
		{
			sound[] = {"A3\sounds_f\vehicles\armor\treads\v2_int_treads_soft_05",0.39810717,1.0};
			frequency = "1";
			volume = "engineOn*(1-camPos)*grass*((((-speed*3.6) max speed*3.6)/	60) factor[(((-49) max 49)/	60),(((-53) max 53)/	60)])";
		};
	};
	class Reflectors{};
	//aggregateReflectors[] = {{ "Left","Right" }};
	smokeLauncherGrenadeCount = 0;
	smokeLauncherVelocity = 0;
	smokeLauncherOnTurret = 0;
	smokeLauncherAngle = 0;
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{
			class Turrets: Turrets
			{
				/*class CommanderOptics: CommanderOptics
				{
					memoryPointGunnerOutOptics = "eye";
					memoryPointGunnerOptics = "eye";
					minElev = -25;
					maxElev = 60;
					initElev = 0;
					minTurn = -360;
					maxTurn = 360;
					initTurn = 0;
					weapons[] = {};
					magazines[] = {};
					soundServo[] = {"A3\sounds_f\dummysound",0.01,1.0,30};
					outGunnerMayFire = 0;
					inGunnerMayFire = 1;
					gunnerAction = "mbt1c_slot2_out";
					gunnerInAction = "mbt1c_slot2_in";
					gunnerGetInAction = "GetInLow";
					gunnerGetOutAction = "GetOutLow";
					gunnerOpticsModel = "\A3\weapons_f\reticle\optics_empty";
					maxHorizontalRotSpeed = .25;	// 1 = 45°/sec
					maxVerticalRotSpeed = .25;		// 1 = 45°/sec
					gunnerOutOpticsModel = "";
					gunnerOpticsEffect[] = {};
					class ViewGunner: ViewCargo{};
					class ViewOptics: ViewOptics
					{
						initAngleX = 0;
						minAngleX = -180;
						maxAngleX = 180;
						initAngleY = 0;
						minAngleY = -100;
						maxAngleY = 100;
						initFov = 1;
						minFov = 1;
						maxFov = 1;
						visionMode[] = {"Normal"};
						thermalMode[] = {2,3};
					};
					startEngine = 0;
					gunnerHasFlares = 1;
					stabilizedInAxes = 3;
					viewGunnerInExternal = 1;
					class HitPoints {};
				};*/
			};
			gunBeg = "Usti hlavne";
			gunEnd = "Konec hlavne";
			gunnerAction = "mbt1_slot2_out";
			gunnerInAction = "mbt1_slot2_in";
			gunnerGetInAction = "GetInHigh";
			gunnerGetOutAction = "GetOutLow";
			weapons[] = {};
			soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
			magazines[] = {};
			forceHideGunner = 1;
			discreteDistance[] = {10};
			discreteDistanceInitIndex = 5;
			memoryPointGunnerOptics = "eye";
			minElev = -5;
			maxElev = 20;
			initElev = 10;
			gunnerOutOpticsModel = "";
			gunnerOutOpticsEffect[] = {};
			gunnerOpticsEffect[] = {};
			gunnerForceOptics = 0;
			inGunnerMayFire = 1;
			viewGunnerInExternal = 1;
			gunnerOpticsModel = "\A3\weapons_f\reticle\optics_empty";
			maxHorizontalRotSpeed = .25;	// 1 = 45°/sec
			maxVerticalRotSpeed = .25;		// 1 = 45°/sec
			class ViewOptics: ViewOptics
					{
						initAngleX = 0;
						minAngleX = -180;
						maxAngleX = 180;
						initAngleY = 0;
						minAngleY = -200;
						maxAngleY = 200;
						initFov = 1;
						minFov = 1;
						maxFov = 1;
						visionMode[] = {"Normal"};
						thermalMode[] = {2,3};
					};
			class HitPoints{};
		};
	};
	class Damage
	{
		tex[] = {};
		mat[] = {};
	};
	class MarkerLights
	{
		class RedBlinking
		{
			name="PositionLight_Red_1_pos";
			color[]={0.12,0.006,0.006,1.0};
			ambient[]={0.1,0.01,0.01,1.0};
			brightness=1;
			blinking=1;
		};
		class YellowBlinking
		{
			name="PositionLight_Red_1_pos";
			color[]={0.12,0.12,0.0,1.0};
			ambient[]={0.1,0.01,0.01,1.0};
			brightness=1;
			blinking=0;
		};
	};
	class AnimationSources: AnimationSources
	{
		class Hook
		{
		source = "user"; 
		initPhase = 0; 
		animPeriod = 2; 
		};		
	};
	class UserActions
	{
		class lowerhook
		{
			displayName = "Lower Hook";
			position = "HookButton";
			priority = 0.4;
			radius = 50;
			onlyForPlayer = 0;
			condition = "this animationPhase ""Hook"" < 0.5";
			statement = "this animate [""Hook"", 1]"; 
		};
	class raisehook: lowerhook
		{
			displayName = "Raise Hook";
			priority = 0.2;
			condition = "this animationPhase ""Hook"" >= 0.5";
			statement = "this animate [""Hook"", 0]"; 
		};
	};
	class RenderTargets
		{
			class LeftMonitor
			{
				renderTarget = "rendertarget0";
				class CameraView1
				{
					pointPosition		= "PIP0_pos";
					pointDirection		= "PIP0_dir";
					renderQuality 		= 2;
					renderVisionMode 	= 4;
					fov 			= 1;
				}; 			
			};	
		 class RightMonitor
			{
				renderTarget = "rendertarget1";
				class CameraView2
				{
					pointPosition		= "PIP1_pos";
					pointDirection		= "PIP1_dir";
					renderQuality 		= 2;
					renderVisionMode 	= 4;
					fov 			= 1;
				}; 			
			};	
		};
};
};

model config:

class CfgSkeletons
{
class Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonBones[]={};
};
class Jbad_CraneCon: Default
{
	skeletonInherit="";
	skeletonBones[]=
	{
		"otocVez","",
		"otocHlaven","otocVez",
		"osaHlavne","otocHlaven",
		"usti hlavne","otocHlaven",
		"hook","otocHlaven",
		"hook_axis","hook"
	};
};
};
class CfgModels
{
class Rotation;
class Translation;
class Default
{
	sectionsInherit="";
	sections[]={};
	skeleton="";
	class Animations
	{
	};
};
class Jbad_CraneCon: Default
{
	sectionsInherit="";
	sections[]= {};
	skeletonName="Jbad_CraneCon";
	class Animations
	{
		class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="OtocVez";
			axis="osaVeze";
			animPeriod=0;
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
			memory = 1;
		};
		class MainGun
		{
			type="translation";
			source="mainGun";
			selection="OtocHlaven";
			axis="OsaHlavne";
			memory="1";
			minValue="-.427";
			maxValue=".432";
			offset0= "-.427";
			offset1= ".432";

		};
		class Hook
		{
			type="translation";
			source="user";
			selection="hook";
			axis="hook_axis";
			memory="1";
			minValue="-.8";
			maxValue="0";
			offset0= "-.8";
			offset1= "0";

		};
	};
};
};

oh also the markerlights don't work. Can tanks have markerlights?

thanks guys any help is greatly appreciated. this is my first venture into a vehicle class..mainly I stick with buildings..but this is fun :D

Share this post


Link to post
Share on other sites

Not completely sure here, but try to put the class Hook source="user"; as source="Hook"; as in you AnimationSource. Also just as a thought wouldn't static turret be a better base for immobile crane?

Edited by HorribleGoat

Share this post


Link to post
Share on other sites

I'm pretty sure I did have user as hook at one point. But I'll try it again.

Also I did have it classed as a staticweapon but the sounds wouldn't work.

Share this post


Link to post
Share on other sites

If the tank class works then then why not. I'll take a shot at reproducing this weekend if I find some spare time! I'll let you know.

Share this post


Link to post
Share on other sites

Ok for anyone interested it seems that the translation animations are borked when trying to apply translation to multiple selections each with a different axis and translation orientation. As soon as I switched the hook from translation to rotation it worked fine. So I just moved the mem point back a bit and gave it a small deg radius and it looks like the hook is lowering pretty good. Oh well TIA.

Share this post


Link to post
Share on other sites

I vaguely remember having similar trouble once with the translation anim, great that you were able to work past it!

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  

×