Jump to content
Sign in to follow this  
i3eefy

Aircraft landing gear

Recommended Posts

Hey all

I'm really new to all of the config and scripting world but I'm tinkering around at everything to learn.

My question is, when you take off in a plane and you hit your default button to retract your landing gear, how do you get that happening in a new addon instead of selecting "Gear up" in the action menu?

Is it in the model itself or in a config file?

Share this post


Link to post
Share on other sites
... and you hit your default button to retract your landing gear ...

Well .... first off, thanks for bring my attention to the existance of a "default button" ... fly all the time and didnt even notice.

Now, back to your question.

Just tested, all my addons (and other peoples for that matter) who are using the default "gear" as the animation source, allows the RightCtrl-G to work.

Didn't have to add anything.

So if your plane has a problem then it seems likely you are manually triggering animation of gear using a UserAction or something.

Is that the case?

Share this post


Link to post
Share on other sites

lol thanks to the sarcasim

anyway I was looking through the config and saw that its defined by the user action.

So all I need now is help with/or were to find the default animation source and i should be good.

Edited by I3eefy

Share this post


Link to post
Share on other sites

Not sarcasim ;) .... first time today I found out about RightCtrl-G

And no problem you browsing my Configs.

Also stands for anyone else wishing to maybe learn (but I wont claim to be perfect)

Unfortunately MODEL.CFG doesn't survive the Binarizing process, so heres an example.

(Which reminds me, maybe I should include a txt version inside the PBO so people can see my model.cfg)

Example Model.cfg

//Tu22M3 update by Gnat
class CfgSkeletons 
{ 
  class Plane; //Define base class.
  class BackFireBones: Plane
{
	isDiscrete=1;
	skeletonInherit = "";
	skeletonBones[]=
	{
		"mainturret","",
		"maingun","mainturret",		
		"bbl","",
		"bbr","",
		"flyheight","",
		"left wheel","",
		"sw2l","left wheel",
		"sw3l","left wheel",
		"sw4l","left wheel",
		"right wheel","",
		"sw2r","right wheel",
		"sw3r","right wheel",
		"sw4r","right wheel",
		"leftwing","",
		"rightwing","",
		"leva smerovka","",
		"leva vejskovka","",
		"lwd","",
		"rwd","",
		"ndl","",
		"ndr","",
		"nosegear","",
		"nosehub","nosegear",
		"sw1","nosehub",
		"prava vejskovka","",
		"SW2","",
		"SW3","",
		"SW4","",
		"prox1","",
		"prox2","",
		"prox3","",
		"prox4",""
	};
};
};
class CfgModels
{
class Plane;
class rkt_tu22m3a: Plane
{
	skeletonName = "BackFireBones";
	sectionsInherit="";
	sections[] = {"mainturret","maingun","skin","num1", "num2", "roundel1", "roundel2", "roundel3", "flyheight", "zbytek"};
	class Animations
	{
		class mainturret //the horizontal moving part of the turret
			{
			type="rotationY";
			source="mainturret";
			selection="mainturret";
			axis="axis1turret";
			animPeriod=0;
			memory=1;
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
			};

		class maingun //the vertical moving part of the turret
			{
			type="rotationX";
			source="maingun";
			selection="maingun";
			axis="axis1gun";
			animPeriod=0;
			memory=1;
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
			};		
		class LeftGear
		{
			type ="rotation";
			source = "gear";
			initPhase=1;
			animPeriod =2;
			selection ="left wheel";
			axis ="axis left wheel";
			angle0 =0;
			angle1 =-1.57;
		};


		class RightGear
		{
			type ="rotation";
			source = "gear";
			initPhase=1;
			animPeriod =2;
			selection ="right wheel";
			axis ="axis right wheel";
			angle0 =0;
			angle1 =1.57;
		};

		class NoseGear
		{
			type ="rotation";
			source = "gear";
			initPhase=1;
			animPeriod =2;
			selection ="nosegear";
			axis ="axis nose wheel";
			angle0 =0;
			angle1 =-1.92;
		};

		class NGDL
		{
			type ="rotation";
			source = "gear";
//				initPhase=1;
//				animPeriod =4;
			selection ="ndl";
			axis ="axis ndl";
			minValue=0.75;
			maxValue=1.0;
			angle0 =0;
			angle1 =-1.57;
		};
		class NGDR
		{
			type ="rotation";
			source = "gear";
			selection ="ndr";
			axis ="axis ndr";
			minValue=0.75;
			maxValue=1.0;
			angle0 =0;
			angle1 =1.57;
		};
		class MGDLa
		{
			type ="rotation";
			selection ="lwd";
			axis ="axislwd";
			source="gear";
			minValue=0.0;
			maxValue=0.2;
			angle0 =0;
			angle1 ="rad -100";
		};
		class MGDLb
		{
			type ="rotation";
			selection ="lwd";
			axis ="axislwd";
			source="gear";
			minValue=0.9;
			maxValue=1.0;
			angle0 =0;
			angle1 ="rad 100";
		};			
		class MGDRa
		{
			type ="rotation";
			selection ="rwd";
			axis ="axisrwd";
			source="gear";
			minValue=0.0;
			maxValue=0.2;
			angle0 =0;
			angle1 ="rad 100";
		};
		class MGDRb
		{
			type ="rotation";
			selection ="rwd";
			axis ="axisrwd";
			source="gear";
			minValue=0.9;
			maxValue=1.0;
			angle0 =0;
			angle1 ="rad -100";
		};			
		class LeftWing
		{
			type ="rotation";
			animPeriod =2;
//				animPeriod =4;
//				source="user1"
			source = "speed";
			memory = true; 
			sourceAddress = "clamp";
//				minValue = 0;
//				maxValue = 1;				
			minValue = 84;  //meter per second
			maxValue = 167;				
			selection ="leftwing";
			axis ="axis left wing";
			angle0 =0;
//				angle1=-1;
			angle1="rad -40";
		};

		class RightWing
		{
			type ="rotation";
			animPeriod =2;
//				animPeriod =4;
//				source="user2"
			source = "speed";
			memory = true; 
			sourceAddress = "clamp";
//				minValue = 0;
//				maxValue = 1;				
			minValue = 84;
			maxValue = 167;				
			selection ="rightwing";
			axis ="axis right wing";
			angle0 =0;
//				angle1 =1;
			angle1 ="rad 40";
		};
		class FrontGearSteer
		{
			type="rotationY";
			source="noseWheelTurn";
			selection="nosehub";
			axis="axisnosehub";
			memory=1;
			minValue=-1.000000;
			maxValue=1.000000;
			angle0="rad -40"; // -0.95398
			angle1="rad 40";  // 0.95398
		};			
		class SW1
		{
     			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw1";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
			angle1 = "rad -360"; 
		};
		class SW2L
		{
     			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw2l";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
     			angle1 = "rad -360"; 
		};
		class SW2R
		{
     			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw2r";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
     			angle1 = "rad -360"; 
		};
		class SW3L
		{
     			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw3l";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
     			angle1 = "rad -360"; 
		};
		class SW3R
		{
			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw3r";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
     			angle1 = "rad -360"; 
		};
		class SW4L
		{
     			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw4l";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
     			angle1 = "rad -360"; 
		};
		class SW4R
		{
     			type = "rotationX";
     			source = "wheel";
//				animPeriod =.001;
			selection ="sw4r";
			axis = "";
			memory = true; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.5;
               angle0 = 0; 
     			angle1 = "rad -360"; 
		};
  			class BF_Rudder
		{
			type = "rotation";
     			source = "rudder";
				selection = "leva smerovka";
			axis = "osa leve smerovky";
			memory = true; 
			sourceAddress = "clamp";
			minValue = -1;
             	maxValue = 1;
               angle0 = "rad 25"; 
     			angle1 = "rad -25";
  			};
  			class BF_ElevRight
		{
     			type = "rotation";
     			source = "elevator";
				selection = "prava vejskovka";
			axis = "osa prave vejskovky";
			memory = true; 
			sourceAddress = "clamp";
			minValue = -1;
             	maxValue = 1;
               angle0 = "rad 35"; 
     			angle1 = "rad -35";
  			};
  			class BF_ElevLeft
		{
     			type = "rotation";
     			source = "elevator";
				selection = "leva vejskovka";
			axis = "osa leve vejskovky";
			memory = true; 
			sourceAddress = "clamp";
			minValue = -1;
             	maxValue = 1;
               angle0 = "rad 35"; 
     			angle1 = "rad -35";
  			};
		  class leftbombbay
		 {
			type="rotation";
			source = "user";
			initPhase= 1;
			animPeriod=4;
			selection="bbl";
			axis="axisbbl";
			angle0=0;
			angle1= "rad 95";
		};

		class rightbombbay
		{
			type="rotation";
			source = "user";
			initPhase= 1;
			animPeriod=4;
			selection="bbr";
			axis="axisbbr";
			angle0=0;
			angle1= "rad -95";
		};
		class flyheight
		{
			type="rotation";
			source = "user";
			initPhase= 0;
			animPeriod=0.01;
			selection="flyheight";
			axis="";
			angle0=0;
			angle1= "rad 180";
		};
	};
};
class rkt_tu22m3b: rkt_tu22m3a
{};
class rkt_tu22m3c: rkt_tu22m3a
{};
class rkt_tu22m3d: rkt_tu22m3a
{};
class rkt_tu22m3u: rkt_tu22m3a
{};
};

Share this post


Link to post
Share on other sites

Thanks for all the help Gnat.

Im about to test the modified files and I'll come back hopefully with success.

Edit: No such luck mate. ill keep trying but thanks for all the help and the code.

I'll keep you posted

Edited by I3eefy

Share this post


Link to post
Share on other sites

It there was UserAction gear in the model, then there was probably a;

gearRetracting = false;

in the config.cpp somewhere too.

That would have to be changed as well, along with the;

source="gear";

in the model.cfg

Share this post


Link to post
Share on other sites
Gnat;1829843']It there was UserAction gear in the model' date=' then there was probably a;

[b']gearRetracting = false;[/b]

in the config.cpp somewhere too.

That would have to be changed as well, along with the;

source="gear";

in the model.cfg

Found the gearRetracting = 1; so that needs to be changed to 0 I'm guessing

:Edit: LoL, I changed all the code lines and now they dont even show up in arma

Edited by I3eefy

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  

×