Jump to content
Αplion

[SOLVED] Aircraft Loadout with bays setup - need help

Recommended Posts

I'm trying to implement the new loadout system to an aircraft with undercarriage bay (the ArmA 2 F35B actually) but I can't find enough info about that (the bays setup in order to work when some weapons will be chosen) except what is written on WiKi (which is not helpful at all).

 

Is anyone familiar with this matter ? I need to know if there is any specific points or parts inside the model which has be named and somehow stated into config ... generally I'm blind on this matter so far but before trying to add this future the aircraft bay was working fine on given condition.

 

Any help will be much appreciated.

Share this post


Link to post
Share on other sites

Hi,
I'm trying to implement all our content to Jet DLC standard too. According to the wiki, you just use the animation source given in the wiki.

bay.1, bay.2,...bay.X - animation state of bay
pylonReadyPos.X - animation state of pylon, missile is released when anim. state of bay and pylon is 1
pylonIsEmpty.X - return 1 when no magazine is attached on pylon
pylonReload.X - reload state of weapon on given pylon
pylonRevolving.X - revolving state of weapon on given pylon

bay.1, bay.X... is the bay corresponding the bays class sorted by the sequence of appearance, for example, if you have:

 

Spoiler

class CfgVehicles
{
    class Plane_Base_F;
    class My_custom_content: Plane_Base_F
    {
        class Components: Components
        {
            class TransportPylonsComponent
            {
                class Bays
                {
                    class BayCenter // corresponding to pylons/##pylon##/bay=1;
                    {
                        bayOpenTime               = 1;
                        openBayWhenWeaponSelected = 1.0; // float value, can be used to half open bay
 
                        // -1 keep open, 0 close after last missile, > 0 keep open for given time after last shot                       
                        autoCloseWhenEmptyDelay   = 2; // when last shot keep 2s open after last shot
                    };
                    class BayRight   // corresponding to pylons/##pylon##/bay=2;
                    {
                        bayOpenTime               = 0.8;
                        openBayWhenWeaponSelected = 0.0;
                    };
                    class BayLeft: BayRight{}; // corresponding to pylons/##pylon##/bay=3;
                };
            };
        };
    };
};

 

 

bay.1 animation source will be BayCenter, bay.2 BayRight and bay.3 BayLeft.

The use of those animation sources is like you used to do.. for example:

 

Spoiler

class CfgSkeletons
{
	class your_content_skeleton
	{
		isDiscrete=1;
		skeletonInherit="";
		skeletonBones[]=
		{
			"bay1_selection","",
			"bay2_selection",""
			"some_other_selections","",
			.
			.
			.
		};
	};
};
class CfgModels
{
	class your_content_p3d_name
	{
		sectionsInherit="";
		sections[]=
		{
			"name_sections_for_hideselection?"
			"camo?"
			"glass?"
		};
		SkeletonName="your_content_skeleton";
		class Animations
		{
			// When BayCenter (bay.1) is 1 (Opened) then rotate
			// the selection of the object named "bay1_selection"
			// 90 degres along "axis_bay1_selection" axis.
			class bay1_animation
			{
				type = "rotation";
				source = "bay.1";
				selection = "bay1_selection";
				axis = "axis_bay1_selection";
				memory = 1;
				sourceAddress = "clamp";
				minValue = 0.000000;
				maxValue = 1.000000;
				angle0 = 0;
				angle1 = "rad 90";
			};
			// More animations
			.
			.
			.
		};
	};
};

 


Hope it helps you.
 

Share this post


Link to post
Share on other sites

@Mickyleitor thanks for the answer. This is the way I have them set also into my model.cfg and config ... in fact this was the old way (without components part) that used and working. I have setup the bays component too but still there is no animation in-game (I have the animation when previewing in Buldozer). Maybe my fault is somewhere on AnimationSources class in config ... is it possible to give me another example (maybe from your config) except that Wiki have, just for that class ?

 

Thanks again.

 

EDIT: OMG I didn't realize that the bay.1 is the animation source that I must set in model.cfg !! solved thanks to you Mickyleitor ... I owe you one mate.

Edited by Αplion

Share this post


Link to post
Share on other sites

I was doing an example test to show you the configuration and although you solved it, I've attached here an example of the Test_Plane_01 from the Samples with bay configuration (I supposed fictional bay into the InnerLeft/Right bays...  Just for further modders looking for examples

https://www.dropbox.com/s/ta8qw1cem4bpumq/BayAnimationExample.rar?dl=0


Changed files are:
 

Spoiler

model.cfg:
Lines 152 and (1309-1334)
config.cpp
Lines 373-388 , 323 and 33
Test_Plane_01.p3d
Just naming selection convention to bays in (almost) all LODs

 

  • Like 2

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

×