Jump to content
riten

Elevator/Aileron & commander

Recommended Posts

Hello,

 

1. I've added Elevator and Aileron animations to my model.cfg, but it is getting wreid... my elevator works like aileron and aileron works like elevator. I'm sure that I've named everything right in my model - selections & axis, but it still doesn't work.

 

2. Second problem is commander, I've proxy named proxy:pilot001 which works fine and proxy:commander001 which doesn't work in game, there is just pilot slot.

 

Object builder (open image in new tab to zoom)

Spoiler

xbJgrxQ.png

 

model.cfg

Spoiler

class CfgSkeletons
{
	class cfgVehicles;
	class Iskra: cfgVehicles
	{
		isDiscrete=0;
		skeletonInherit="";
		skeletonBones[]=
		{
			
			"front_gear","",
			"front_gear_1","",
			"front_gear_2","",
			
			"gear1","",		
			"gear1-3","",
			"gears1","",			
			"gear_clap1","",
			
			"gear2","",		
			"gear2-3","",
			"gears2","",			
			"gear_clap2","",
			
			"flapL","",
			"flapR","",
			"elevatorL","",
			"elevatorR","",
			"rudder","",
			"aileronL","",
			"aileronR","",
			
			
			
			
		};
	};
};
class Rotation;
class CfgModels
{
	class Vehicle;
	class Plane: Vehicle
	{
		sectionsInherit="";
		sections[]={};
		skeletonName="Plane";
		class Animations
		{
		};
	};
	class ISKRA: Plane
	{
		sections[]=
		{			
			"camo1",
			"camo2"
		};
		skeletonName="Iskra";
		class Animations
		{
			
			/*front gear start*/
			class front_gear: Rotation
			{
				type="rotation";
				source="Gear";
				selection="front_gear";
				axis="front_gear_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=0.6;
				angle0=0;
				angle1=2;
			};
			class front_gear_1: Rotation
			{
				type="rotation";
				source="Gear";
				selection="front_gear_1";
				axis="front_gear_axis_1";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=1.6;
				angle1=0;
			};
			class front_gear_2: Rotation
			{
				type="rotation";
				source="Gear";
				selection="front_gear_2";
				axis="front_gear_axis_2";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=-1.6;
				angle1=0;
			};
			
			/*front gear end*/
			/*gear 1 start */
			
			class Gear1: Rotation
			{
				type="rotation";
				source="Gear";
				selection="Gear1";
				axis="Gear1_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=0.001;
				angle1=-1.55;
			};
		   	
			
			class GearHide1
			{
				type="hide";
				source="Gear";
				selection="gears1";
				minValue=0;
				maxValue=1;
				hideValue=0.1;
				
			};
		    class Gear1_3: Rotation
			{
				type="rotation";
				source="Gear";
				selection="Gear1-3";
				axis="Gear1-3_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=0;
				angle1=1.1;
			};

			class Gear_clap1: Rotation
			{
				type="rotation";
				source="Gear";
				selection="Gear_clap1";
				axis="Gear_clap1_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=2;
				angle1=0;
			};
			
			/* gear1 end */
			/* gear2 start */
			
			class Gear2: Rotation
			{
				type="rotation";
				source="Gear";
				selection="Gear2";
				axis="Gear2_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=0.001;
				angle1=1.55;
			};
			
			
			class GearHide
			{
				type="hide";
				source="Gear";
				selection="gears2";
				minValue=0;
				maxValue=1;
				hideValue=0.1;
				
			};
		    class Gear2_3: Rotation
			{
				type="rotation";
				source="Gear";
				selection="Gear2-3";
				axis="Gear2-3_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=0;
				angle1=-1.1;
			}; 
		  
			
			class Gear_clap2: Rotation
			{
				type="rotation";
				source="Gear";
				selection="Gear_clap2";
				axis="Gear_clap2_axis";
				memory=1;
				sourceAddress="clamp";
				minValue=0;
				maxValue=1;
				angle0=-2;
				angle1=0;
			};
			
			class FlapL: Rotation
			{
				type="rotation";
				source="flap";
				selection="FlapL";
				axis="FlapL_axis";
				minValue=0;
				maxValue=1;
				angle1=-0.60000002;
				angle0=0;
			};
			class FlapR: FlapL
			{
				type="rotation";
				selection="FlapR";
				axis="FlapR_axis";
			};
			class AileronL: Rotation
			{
				source="aileron";
				type="rotation";
				selection="aileronL";
				axis="aileronL_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.43633199;
				angle1=0.52359903;
			};
			class AileronR: AileronL
			{
				type="rotation";
				selection="aileronR";
				axis="aileronR_axis";
				angle0=-0.52359903;
				angle1=0.43633199;
			};
			class ElevatorL: Rotation
			{
				type="rotation";
				source="elevator";
				selection="elevatorL";
				axis="elevatorL_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.49916399;
				angle1=0.49916399;
			};
			class ElevatorR: ElevatorL
			{
				type="rotation";
				selection="elevatorR";
				axis="elevatorR_axis";
				angle0=-0.5;
				angle1=0.5;
			};
			class Rudder: Rotation
			{
				type="rotation";
				source="rudder";
				selection="rudder";
				axis="rudder_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.37524599;
				angle1=0.37524599;
				memory=1;
			};
			
			
		};
	};
};

 

 

config.cfg

Spoiler

#define true   	 		1
#define false    		0
#define private         0
#define protected       1
#define public        	2
#define TEast        	0
#define TWest        	1
#define TGuerrila       2
#define TCivilian       3
#define TSideUnknown    4
#define TEnemy        	5
#define TFriendly       6
#define TLogic        	7

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 MY_Vehicles 
	{
	units[] = {"b_riten_iskra"};
	weapons[] = {};
	requiredAddons[] = {"A3_Air_F","A3_Air_F_Gamma"};
	requiredVersion = 1.0;
	};
	class A3_Data_F_ParticleEffects
	{
		addonRootClass = "A3_Data_F";
		requiredAddons[] = {"A3_Data_F"};
		requiredVersion = 0.1;
		units[] = {};
		weapons[] = {};
	};
};

/*
class CfgSounds
{
	sounds[] = {};
	class Eject_sound
	{
		name = "Eject_sound"; // Sound from Florian Müller's mod
		sound[] = {"\riten_iskra\sounds\eject.ogg",1,1};
		titles[] = {};
	};
};

class CfgMovesBasic {
	class actions;
	class defaultDie;
	class manActions {
		EjectPos = "EjectPos";
	};
	
};

class CfgMovesMaleSdr: CfgMovesBasic
{
	class states
	{
		class crew;
		class EjectPos: crew
		{
			file = "\riten_iskra\data\anim\EjectPos.rtm";
			interpolateTo[]= {"AinvPknlMstpSlayWrflDnon",1};
		};
	};
};

class CfgCloudlets
{
  class RocketBacksmokeRPGNT;		
  class RedAVsmoke: RocketBacksmokeRPGNT 
  {
	color[] = {{1,0,0,0.5},{1,0,0,0.4},{1,0,0,0.32},{1,0,0,0.24},{1,0,0,0.16},{1,0,0,0.08},{1,0,0,0.01}};
	colorCoef[] = {0.65,0,0,0.55}; 
	lifeTime=25;	
	colorVar[] = {0.2,0,0,0.03};
	angleVar = 0;
	size[] = {0.8,1.8,2.5,2.9,3.25,3.5};
	sizeCoef = 1.5;
	sizeVar = 0.6;
  };
  class WhiteAVsmoke: RedAVsmoke
  {
   color[] = {{1,1,1,0.5},{1,1,1,0.4},{1,1,1,0.32},{1,1,1,0.24},{1,1,1,0.16},{1,1,1,0.08},{1,1,1,0.01}};
   colorCoef[] = {0.65,0.65,0.65,0.55}; 
  };
  class BlueAVsmoke: RedAVsmoke
  {
   color[] = {{0,0,1,0.5},{0,0,1,0.4},{0,0,1,0.32},{0,0,1,0.24},{0,0,1,0.16},{0,0,1,0.08},{0,0,1,0.01}};
   colorCoef[] = {0,0,0.65,0.55};   
  };
};
*/
	
class CfgVehicles 
{
	class Air;
	class Plane: Air 
	{			
		class HitPoints;
	};
	class Plane_Base_F: Plane 
	{
		class AnimationSources;
		class HitPoints: HitPoints
		{
			class HitHull;
		};
	};
   
class b_riten_iskra: Plane {
        vehicleClass = "b_riten_iskra";
        simulation = "airplane";
        _generalMacro = "airplane"; 
        gearRetracting = 1;		
        side = 1;
		isCopilot = 1;
		proxyType="CPCommander";
		proxyIndex = 1;
		availableForSupportTypes[] = {"CAS_Bombing"};
		destrType = "DestructWreck";
        displayName = "TS-11 Iskra";
        model = "\riten_iskra\iskra.p3d";
        picture = "\riten_iskra\icon.paa";
        Icon = "\riten_iskra\icon.paa";
        scope = 2;
		driverCanEject = "false";
        faction = "BLU_F";
        crew = "B_Pilot_F";
		CommanderType="B_Pilot_F";
        DriverAction = "Plane_Fighter_03_pilot";
		CommanderAction = "Plane_Fighter_03_pilot";
		CommanderInAction = "Plane_Fighter_03_pilot";
		CommanderName = "Instructor";
		castCommanderShadow = false;
		castPilotShadow = false;
		weapons[] = {"Twin_Cannon_20mm","GBU12BombLauncher","missiles_SCALPEL","CMFlareLauncher"};
		magazines[] = {"300Rnd_20mm_shells","2Rnd_GBU12_LGB","2Rnd_GBU12_LGB","2Rnd_LG_scalpel","120Rnd_CMFlare_Chaff_Magazine"};
        getInAction = "GetInLow";
        hasCommander = true;		
		attenuationEffectType = "PlaneAttenuation";
		soundGetIn[] = {"A3\Sounds_F\air\Plane_Fighter_03\buzzard_getin",1.0,1,40};
		soundGetOut[] = {"A3\Sounds_F\air\Plane_Fighter_03\getout",1.0,1,40};
		soundDammage[] = {"",0.56234133,1};
		soundEngineOnInt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-start_int",1.0,1.0};
		soundEngineOnExt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-start_ext",1.7782794,1.0,500};
		soundEngineOffInt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-stop_int",1.0,1.0};
		soundEngineOffExt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-stop_ext",1.7782794,1.0,500};
		soundLocked[] = {"\A3\Sounds_F\weapons\Rockets\locked_1",0.31622776,1};
		soundIncommingMissile[] = {"\A3\Sounds_F\vehicles\air\noises\alarm_locked_by_missile_1",0.31622776,1.5};
		soundGearUp[] = {"A3\Sounds_F_EPC\CAS_02\gear_up",0.7943282,1.0,150};
		soundGearDown[] = {"A3\Sounds_F_EPC\CAS_02\gear_down",0.7943282,1.0,150};
		soundFlapsUp[] = {"A3\Sounds_F_EPC\CAS_02\Flaps_Up",0.63095737,1.0,100};
		soundFlapsDown[] = {"A3\Sounds_F_EPC\CAS_02\Flaps_Down",0.63095737,1.0,100};
		landingSoundInt0[] = {"A3\Sounds_F\vehicles\air\noises\landing_wheels_large_int1",1.0,1.0,100};
		landingSoundInt1[] = {"A3\Sounds_F\vehicles\air\noises\landing_wheels_large_int2",1.0,1.0,100};
		landingSoundInt[] = {"landingSoundInt0",0.5,"landingSoundInt1",0.5};
		landingSoundOut0[] = {"A3\Sounds_F\vehicles\air\noises\landing_wheels_ext1",1.7782794,1.0,100};
		landingSoundOut1[] = {"A3\Sounds_F\vehicles\air\noises\landing_wheels_ext2",1.7782794,1.0,100};
		landingSoundOut[] = {"landingSoundOut0",0.5,"landingSoundOut1",0.5};		
		driverRightHandAnimName = "pilot_stick";
		driverLeftHandAnimName = "pilot_throttle";
		driverleftleganimname = "pilot_rudder";
		driverrightleganimname = "pilot_rudder";
		insideSoundCoef = 0.2;
        fuelCapacity = 10000;
        landingSpeed = 185;
		acceleration = 420;
		laserScanner=1;
		maxSpeed = 890;
		altFullForce = 9000;
		altNoForce = 20000;
        noseDownCoef = 0;    // how much goes nose down during turns
        nightVision = 1; //A3
        enableGPS = 1; //A3
        radarType = 4; //A3
        LockDetectionSystem = 8; //A3
        incomingMissileDetectionSystem = 16; //A3
        irScanRangeMax = 10000; //A3
        envelope[] = {0, 0.2, 1.2, 3, 5.1, 7, 7.3, 7, 6.3, 5.2, 3.8, 1.8, 0.5, 0};
        aileronSensitivity = 1;
		elevatorSensitivity = 0.8;
		draconicForceXCoef = 2.5;
		draconicForceYCoef = 0.5;
		draconicForceZCoef = 0.5;
		draconicTorqueXCoef = 0.15;
		draconicTorqueYCoef = 2.5;
        vtol = 0;
		
		
		class Exhausts
		{
			class Exhaust1
			{
				direction = "exhaust_dir";
				effect = "ExhaustsEffectPlane";
				position = "exhaust";
			};
		};
		
		
		class Sounds
		{
			class EngineLowOut
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_low_ext",1.4125376,1.0,1200};
				frequency = "1.0 min (rpm + 0.5)";
				volume = "camPos*2*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])";
			};
			class EngineHighOut
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_engi_ext",1.4125376,1.2,1400};
				frequency = "1";
				volume = "camPos*4*(rpm factor[0.5, 1.1])*(rpm factor[1.1, 0.5])";
			};
			class ForsageOut
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-fors_ext",1.1220185,0.99,1700};
				frequency = "1";
				volume = "engineOn*camPos*(thrust factor[0.6, 1.0])";
				cone[] = {3.14,3.92,2.0,0.5};
			};
			class WindNoiseOut
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\noise",0.56234133,1.0,150};
				frequency = "(0.1+(1.2*(speed factor[1, 150])))";
				volume = "camPos*(speed factor[1, 150])";
			};
			class EngineLowIn
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_low_int",1.0,1.0};
				frequency = "1.0 min (rpm + 0.5)";
				volume = "(1-camPos)*((rpm factor[0.7, 0.1])*(rpm factor[0.1, 0.7]))";
			};
			class EngineHighIn
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_engi_int",0.56234133,1.2};
				frequency = "1";
				volume = "(1-camPos)*(rpm factor[0.85, 1.0])";
			};
			class ForsageIn
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-fors_int",0.56234133,1.0};
				frequency = "1";
				volume = "(1-camPos)*(engineOn*(thrust factor[0.6, 1.0]))";
			};
			class WindNoiseIn
			{
				sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\noise_int",0.39810717,1.0};
				frequency = "(0.1+(1.2*(speed factor[1, 150])))";
				volume = "(1-camPos)*(speed factor[1, 150])";
			};
			class RainExt
			{
				sound[] = {"A3\Sounds_F\vehicles\noises\rain1_ext",1.7782794,1.0,100};
				frequency = 1;
				volume = "camPos * rain * (speed factor[50, 0])";
			};
			class RainInt
			{
				sound[] = {"A3\Sounds_F\vehicles\noises\rain1_int",1.0,1.0,100};
				frequency = 1;
				volume = "(1-camPos) * rain * (speed factor[50, 0])";
			};
		};			
	};
};
			
 

 

 

Share this post


Link to post
Share on other sites
					class ElevatorL
					{
						type = "rotation";
						source = "elevator";
						selection = "elevator_l";
						axis = "elevator_l_axis";
						minValue = -1;
						maxValue = 1;
						angle0 = "rad 30";
						angle1 = "rad -30";
					};
					class ElevatorR : ElevatorL
					{
						selection = "elevator_r";
					};
					class AileronL
					{
						type = "rotation";
						source="aileron";
						selection="aileron_1_1";
						axis="aileron_1_1_axis";
						minValue=-0.500000;
						maxValue=0.500000;
						angle0="rad -30";
						angle1="rad 30";
					};
					class AileronR: AileronL
					{
							selection = "aileron_1_2";
							axis = "aileron_1_2_axis";
					};

Here's my model config for the elevators and ailerons, I think the reason yours doesn't work is because you inherit from the "Rotation" class, but I may be wrong.

Also for the proxy, name it "pilot.001" and "gunner.001". Then in the turret config for the commander put "isCommanding = 1;". I believe that should work.

Share this post


Link to post
Share on other sites

I've tested ur method, still same issue :(

 

btw I've took my cfg from BIS Buzzard config so that must be something else, but I have no idea what...

Share this post


Link to post
Share on other sites

I think I found it. I've noticed when you have two selections using the same animation source, they are inverse of each other. So, I either recommend adding both your elevator selections to one single one, or making them negative/positive of each other. Here, I'll fix your animations.

 

//Option 1
class Elevator: Rotation
			{
				type="rotation";
				source="elevator";
				selection="elevator"; //Changed to one single selection, includes what used to be elevatorL and elevatorR
				axis="elevator_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.49916399;
				angle1=0.49916399;
			};

//Option 2
class ElevatorL: Rotation
			{
				type="rotation";
				source="elevator";
				selection="elevatorL";
				axis="elevatorL_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.49916399;
				angle1=0.49916399;
			};
			class ElevatorR: ElevatorL
			{
				type="rotation";
				selection="elevatorR";
				axis="elevatorR_axis";
				angle0=0.5; //Noticed I changed the angle 0 from -0.5 to positive 0.5
				angle1=-0.5; //Same thing here.
			};

 

Likewise, with your aileron, do something like this:

 

class AileronL: Rotation
			{
				source="aileron";
				type="rotation";
				selection="aileronL";
				axis="aileronL_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.43633199;
				angle1=0.52359903;
			};
			class AileronR: AileronL
			{
				selection="aileronR";
				axis="aileronR_axis";
			};

 

See if that works?
        

 

Share this post


Link to post
Share on other sites

@hnchmc

 

Still not working, I've also tested something like: 

 

class AileronL: Rotation
			{
				source="elevator";
				type="rotation";
				selection="aileronL";
				axis="aileronL_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.43633199;
				angle1=0.52359903;
			};
			class AileronR: AileronL
			{
				selection="aileronR";
				axis="aileronR_axis";
			};

 

but it acts exactly same way and if I change my Elevator source to: aileron or elevator it still behave like aileron

Share this post


Link to post
Share on other sites

Try removing the rotation inheritance and do what I did?

Share this post


Link to post
Share on other sites

@hnchmc - told you, that I've already tried without rotation :) and I've exactly same code in my previous jet that is working like that.

 

 

I had to change values, no idea why it doesn't works like in my previous jet mod, but that is how I made it:

 

class AileronL: Rotation
			{
				source="aileron";
				type="rotation";
				selection="aileronL";
				axis="aileronL_axis";
				minValue=-1;
				maxValue=1;
				angle0=-0.43633199;
				angle1=0.52359903;
			};
			class AileronR
			{
				source="aileron";
				type="rotation";
				selection="aileronR";
				axis="aileronR_axis";
				minValue=-1;
				maxValue=1;
				angle0=0.43633199;
				angle1=-0.52359903;
			};
			class ElevatorL
			{
						type = "rotation";
						source = "elevator";
						selection = "elevatorL";
						axis = "elevatorL_axis";
						minValue = -1;
						maxValue = 1;
						angle0 = "rad 30";
						angle1 = "rad -30";
			};
			class ElevatorR : ElevatorL
			{
						selection = "elevatorR";
						axis = "elevatorR_axis";
						angle0 = "rad -30";
						angle1 = "rad 30";
			};

 

and commander slot fixed by adding turret :)

Share this post


Link to post
Share on other sites

Odd. It's always worked for me. I'll copy and paste my animation from my P40 here:

Spoiler

class ElevatorL
			{
				type="rotation";
				source="elevator";
				selection="elevator";
				axis="axis_elevator";
				minValue=-1;
				maxValue=1;
				angle0="rad -30";
				angle1="rad 30";
			};
			
		
			class AileronL
			{
				type="rotation";
				source="aileron";
				selection="aileron_l";
				axis="axis_aileron_l";
				minValue=-0.500000;
				maxValue=0.500000;
				angle0="rad 30";
				angle1="rad -30";
			};
					
			class AileronR2: AileronL
			{
				selection="aileron_r";
				axis="axis_aileron_r";
			};

 

 

That's always worked for me. Odd that it isn't for you O_o

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

×