Jump to content
Sign in to follow this  
Hawke1992

Animation Problem

Recommended Posts

Hey guys, i've made my self a C-130 and now making a AC-130.

All i have done to make the AC-130 is add a turret to the C-130 model and i got the class turret working but its the animations, they dont work.

The C-130 animations worked.

My model.cfg

Model name = ac130

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSkeletons

{

class Vehicle;

class plane: Vehicle

{

skeletonBones[]=

{

"backgear0",

"",

"backgear1",

"",

"clan",

"",

"door1",

"",

"door2",

"",

"Door3",

"",

"engine1",

"",

"engine2",

"",

"engine3",

"",

"engine4",

"",

"front_gear",

"",

"frontkl",

"",

"fuellight",

"",

"g1",

"",

"g2",

"",

"g3",

"",

"hight",

"",

"jump",

"",

"jumpprepare",

"",

"L svelto",

"",

"leftkl",

"",

"leftkl1",

"",

"leva smerovka",

"",

"leva vejskovka",

"",

"lkd klapka",

"",

"lkh klapka",

"",

"ls klapka",

"",

"P svetlo",

"",

"pkd klapka",

"",

"pkh klapka",

"",

"prava vejskovka",

"",

"ps klapka",

"",

"r1",

"",

"r2",

"",

"r3",

"",

"rampa",

"",

"rampa1",

"",

"ramplight",

"",

"relase",

"",

"reverseprops",

"",

"rightkl",

"",

"rightkl1",

"",

"something",

"",

"stall",

"",

"tmp",

"",

"temp1",

"",

"trotle1",

"",

"trotle2",

"",

"trotle3",

"",

"trotle4",

"",

"vrtule",

"",

"vrtule1",

"",

"vrtule2",

"",

"vrtule3",

"",

"vrtule staticka",

"",

"warninglightl",

"",

"warninglightr"

};

};

};

class Rotation;

class CfgModels

{

class Vehicle;

class ac130: Vehicle

{

sectionsInherit="Vehicle";

sections[]={"cislo",

"grupa",

"side",

"sektor",

"clan",

"podsvit pristroju",

"poskozeni",

"L svetlo",

"P svetlo",

"zasleh",

"sklo predni p",

"sklo predni l",

"vrtule staticka",

   };

skeletonName="plane";

class Animations

{

class backgear0: Rotation

        {

           type="rotation";

           animPeriod=6;

   source = "gear";

           selection="backgear0";

           axis="osbackgear0";

   memory=1;

   sourceAddress="clamp";

   angle0=0.000000;

   angle1=0.872;

        };

class backgear1: Rotation

        {

           type="rotation";

           animPeriod=6;

   source = "gear";

           selection="backgear1";

           axis="osbackgear1";

           memory = 1;

   angle0=0.000000;

   angle1=0.872;

        };

class leftkl: Rotation

        {

           type="rotation";

           animPeriod=2;

   source = "gear";

           selection="leftkl";

           axis="osleftkl";

           angle0=0;

   memory = true;

           angle1=-0.523;

        };

class leftkl1: Rotation

        {

           type="rotation";

           animPeriod=1.2;

   source = "gear";

           selection="leftkl1";

           axis="osleftkl1";

           angle0=0;

   memory = true;

           angle1=3.14;

        };

class rightkl: Rotation

        {

           type="rotation";

           animPeriod=2;

   source = "gear";

           selection="rightkl";

           axis="osrightkl";

           angle0=0;

   memory = true;

           angle1=0.523;

        };

class rightkl1: Rotation

        {

           type="rotation";

           animPeriod=1.2;

   source = "gear";

           selection="rightkl1";

           axis="osrightkl1";

           angle0=0;

   memory = true;

           angle1=-3.14;

        };

        class frontkl: Rotation

        {

           type="rotation";

           animPeriod=2;

   source = "gear";

           selection="frontkl";

           axis="osfrontkl";

           angle0=0;

   memory = true;

           angle1=0.195;

        };

class NoseGear: Rotation

        {

           type="rotation";

           animPeriod=6;

   source = "gear";

           selection="front_gear";

           axis="osfront_gear";

           angle0=0;

   memory = true;

           angle1=1.6;

        };

class vrtule

        {

           type = "rotation";

           source = "rotor";

           selection = "vrtule";

           axis = "osa_vrtule";

           angle0 = 0;

           angle1 = 360;

           sourceAddress = "loop";

           

        };

                      class vrtule1:vrtule

        {

           selection = "vrtule1";

           axis = "osa_vrtule_1";

        };

                       class vrtule2:vrtule

        {

           selection = "vrtule2";

           axis = "osa_vrtule_2";

        };

                       class vrtule3:vrtule

        {

           selection = "vrtule3";

           axis = "osa_vrtule_3";

        };  

class flap: Rotation

{

type="rotationX";

Source= "flap";

selection="ls klapka";

axis="osa ls klapky";

minValue=0.500000;

maxValue=1.000000;

angle1=-1.25;

};

class flap2: Rotation

{

type="rotationX";

Source= "flap";

selection="ps klapka";

axis="osa ls klapky";

minValue=0.500000;

maxValue=1.000000;

angle1=-1.25;

};

class Elevator: Rotation

{

type="rotationX";

source="elevator";

selection="leva vejskovka";

axis="osa leve vejskovky";

minValue=-1.000000;

maxValue=1.000000;

angle0=-0.499164;

angle1=0.499164;

};

class Elevator2: Rotation

{

type="rotationX";

source="elevator";

selection="prava vejskovka";

axis="osa prave vejskovky";

minValue=-1.000000;

maxValue=1.000000;

angle0=-0.499164;

angle1=0.499164;

};

class Rudder: Rotation

{

type="rotationY";

source="rudder";

selection="leva smerovka";

axis="osa_rudder";

memory = true;

sourceAddress = "clamp";

minValue = -1;

                  maxValue = 1;

                    angle0 = "rad 25";

      angle1 = "rad -25";

};

class AileronLT: Rotation

{

type="rotationX";

source="aileron";

selection="lkh klapka";

axis="osa lk klapky";

minValue=-1.000000;

maxValue=1.000000;

angle0=-0.436332;

angle1=0.523599;

};

class AileronLB: Rotation

{

type="rotationX";

source="aileron";

selection="lkd klapka";

axis="osa lk klapky";

minValue=-1.000000;

maxValue=1.000000;

angle0=-0.436332;

angle1=0.523599;

};

class AileronRB: Rotation

{

type="rotationX";

source="aileron";

selection="pkd klapka";

axis="osa pk klapky";

minValue=-1.000000;

maxValue=1.000000;

angle0=0.436332;

angle1=-0.523599;

};

class AileronRT: Rotation

{

type="rotationX";

source="aileron";

selection="pkh klapka";

axis="osa pk klapky";

minValue=-1.000000;

maxValue=1.000000;

angle0=0.436332;

angle1=-0.523599;

};

class rampa

{

type="rotation";

// initPhase=1;

// source = "damper";

source = "MoveX1";

animPeriod=6;

selection="rampa";

axis="osrampa";

angle0=0;

angle1=0.66;

};

class rampa1: Rotation

{

type="rotation";

Source = "MoveX2";

animPeriod=5;

selection="rampa1";

axis="osrampa1";

angle0=0;

angle1=0.523;

};

class door1: Rotation

{

type="rotation";

animPeriod=4;

source = "MoveX3";

selection="door1";

axis="osdoor1";

angle0=0;

angle1=-2.4;

};

class door2: Rotation

{

type="rotation";

animPeriod=3;

source = "MoveX4";

selection="door2";

axis="osdoors";

angle0=0;

angle1=0.785;

};

class door3: Rotation

{

type="rotation";

animPeriod=3;

source = "MoveX5";

selection="door3";

axis="osdoors";

angle0=0;

angle1=-0.785;

};

class cargoload: Rotation

        {

type="rotation";

            animPeriod=0.01;

source = "MoveX6";

            selection="something";

            axis="osrampa";

            angle0=0;

          angle1=1;

        };

class relase: Rotation

        {

            type="rotation";

            animPeriod=0.01;

source = "MoveX7";

            selection="relase";

            axis="osrampa";

            angle0=0;

          angle1=1;

        };

class fuellight: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX8";

            selection="fuellight";

            axis="osfuellight";

            angle0=0;

          angle1=3.14;

        };

class ramplight: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX9";

            selection="ramplight";

            axis="osramplight";

            angle0=0;

          angle1=3.14;

        };

class warninglightl: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX10";

            selection="warninglightl";

            axis="oswarninglightl";

            angle0=0;

          angle1=3.14;

        };

class warninglightr: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX11";

            selection="warninglightr";

            axis="oswarninglightr";

            angle0=0;

          angle1=3.14;

        };

class stall: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX12";

            selection="stall";

            axis="osstall";

            angle0=0;

          angle1=3.14;

        };

class hight: Rotation

        {

            type="rotation";

            animPeriod=0.05;

       source = "altBaro";

            selection="hight";

            axis="oshight";

            angle0=0;

          angle1=3.14;

        };

class jumpprepare: Rotation

        {

            type="rotation";

            animPeriod=3;

source = "MoveX13";

            selection="jumpprepare";

            axis="osjump";

            angle0=0;

          angle1=3.14;

        };

class jump: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "damper";

            selection="jump";

            axis="osjump";

            angle0=0;

          angle1=3.14;

        };

class r1: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MOveX14";

            selection="r1";

            axis="osr1";

            angle0=0;

          angle1=3.14;

        };

class g1: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX15";

            selection="g1";

            axis="osg1";

            angle0=0;

          angle1=3.14;

        };

class r2: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX16";

            selection="r2";

            axis="osr2";

            angle0=0;

          angle1=3.14;

        };

class g2: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX17";

            selection="g2";

            axis="osg2";

            angle0=0;

          angle1=3.14;

        };

class r3: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MOveX18";

            selection="r3";

            axis="osr3";

            angle0=0;

          angle1=3.14;

        };

class g3: Rotation

        {

            type="rotation";

            animPeriod=0.05;

source = "MoveX19";

            selection="g3";

            axis="osg3";

            angle0=0;

          angle1=3.14;

        };

class trotle1

{

type="rotation";

animPeriod=2;

source = "MoveX21";

selection="trotle1";

axis="ostrotle";

angle0=0;

angle1=1.918;

};

class trotle2

{

type="rotation";

animPeriod=2;

source = "MoveX20";

selection="trotle2";

axis="ostrotle";

angle0=0;

angle1=1.918;

};

class trotle3

{

type="rotation";

animPeriod=2;

source = "MoveX22";

axis="ostrotle";

angle0=0;

angle1=1.918;

};

class trotle4

{

type="rotation";

animPeriod=2;

source = "MoveX23";

selection="trotle4";

axis="ostrotle";

angle0=0;

angle1=1.918;

};

class reverseprops

{

type="rotation";

animPeriod=1;

source = "MoveX24";

selection="reverseprops";

axis="ostrotle";

angle0=0;

angle1=-1.7;

};

};

};

The model config is the same but i changed the class <modelname> to the model name my ac130 has.

I've tried everything i can think of and it still will not work.

Share this post


Link to post
Share on other sites
Quote[/b] ]i've made my self a C-130

made or converted ? smile_o.gif

Quote[/b] ]All i have done to make the AC-130 is add a turret to the C-130 model and i got the class turret working but its the animations, they dont work.

The C-130 animations worked.

turrets do not work for planes anyway wink_o.gif it will rotate but will not fire. you have to do a lot of scripted work to make smth like ac130 working in game, and even with a lot of talent i dubt you'll succeed.

Share this post


Link to post
Share on other sites

No i have actualy got it to fire the way i wanted but none of the animations work.

I've made it my self.

Share this post


Link to post
Share on other sites
Quote[/b] ]I've made it my self.

can you please share some screenies ? smile_o.gif c-130 is smth i'm looking forward too

Quote[/b] ]No i have actualy got it to fire the way i wanted but none of the animations work.

it will fire. straight ahead all the time no matter what animations defined

Share this post


Link to post
Share on other sites

You may have got it to fire, but either way experts HAVE been quoted as confirming Turrets don't work on Aircraft (as they do work on choppers or tanks or cars etc etc)

Do ANY animations work at all, or none ?

The p3d is in the root directory right?

Share this post


Link to post
Share on other sites

Yeah the p3d is in the root. The animations do not work at all, i dont know why but they just will not work.

Share this post


Link to post
Share on other sites

You are using protected definitions, "plane" and "vehicle" etc are DEFAULT items, you can't use those.

Should look like this;

Quote[/b] ]

class CfgSkeletons

{

class Plane;

class su33BonesAA: Plane

{

isDiscrete=0;

skeletonInherit = "";

skeletonBones[]=

{

"damageHide","",

"LightHide","",

"light_Source1","",

"light_Target1","",

"R27_1","",

...............

...............

...............

and

Quote[/b] ]

class CfgModels

{

class Plane;

class rktsu33_bluAA_mesh: Plane

{

sectionsInherit="";

skeletonName = "su33BonesAA";

sections[] =

{

"light_Source1",

"light_Target1",

"roundel",

"num1_co",

"num2_co",

"zbytek",

"clan",

"clan_sign"

};

class Animations

{

class FlapFL

{

type ="rotation";

source="flap";

selection="flap_fl";

axis="flap_fl_axis";

angle0=0;

angle1="rad -28.6";

minValue=0.500000;

maxValue=1;

};

class FlapFR: FlapFL

{

selection="flap_fr";

axis="flap_fr_axis";

angle1="rad 28.6";

};

...............

...............

...............

Share this post


Link to post
Share on other sites

if your using all code inside cpp file, you should delete model.cfg .... or vice versa

The assumption is you have named all sections of your model just like the names in your config ..........

Bit confused by the huge series of bones and animations, yet you have never got animation working ... ? Someone elses config and/or model?

Suggest start small, delete most of your config, start by just animating ONE part of you model.

TIP:

If you use MODEL.CFG, you can test the animations inside O2. (center mouse button and scroll wheel)

Share this post


Link to post
Share on other sites

in your original cfg above...

in the class CfgSkeletons you make reference to predefined class called 'vehicle' and then your 'plane' skeleton inherits from it.

Where is your definition for 'vehicle' defined and is it accessible to binarize.exe during the binarization process? - I suspect not.

Further... in the CfgModels class you make reference to a predefined class called 'Vehicle' and then your 'ac130' model inherits from it.

Where is your definition for 'Vehicle' defined and is it accessible to binarize.exe during the binarization process? - I suspect not.

Gnat's statement...

Quote[/b] ]You are using protected definitions, "plane" and "vehicle" etc are DEFAULT items, you can't use those.

is a little misleading imo...

In the case of .cfg files there is no 'protected' definitions... this accessibility feature is on the .cpp side of things and has nothing to do with the .cfg side of things.

I think what he is trying to tell you is that you should use a .cfg structure that is indeed a little more structured.

that is... you have a skeleton defined called 'plane'.

Is this skeleton of a specific nature, does it contain bones that are only relevant to an 'ac130'?

What he is trying to highlight to you is that you should have a structure more like...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSkeletons {

  class Default;

  class Plane: Default {

  // all skeletal stuff that is generic/common to all planes

  // should be defined in this class.

  };

  class C130_Bones: Plane {

  // inherits standard 'Plane' skeleton and adds additional

  // bones that are generic to all C130's.

  };

  class AC130_Bones: C130_Bones {

  // inherits from the standard generic/common skeleton for

  // all C130's and adds a few extra bones specific to an AC130.

  };

};

The above CfgSkeletons definition is completely reliant on being able to find and make reference to an externally defined class called 'Default' during the binarization of the model. If binarize.exe is unable to reference this 'class Default;' then the subsequent skeletons will not be defined.

So, to reiterate my question... Where is your definition for 'class Vehicle;' in your original post?

Next....CfgModels.

The purpose of CfgModels is to allow you to define generic/common definitons for models that do not actually exist as physical models in the game but act as 'parent' definitions for actual models that do exist in the game.

Also, in defining a CfgModel entry you are making definitions for how various 'bones' or 'named selections' or 'portions' of your models will move.

As an example... your CfgModels class could look something like...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgModels {

  class Default;

  class Plane: Default {

  // A generic/common parent class that is not an actual p3dm model.

  // Should have animations defined that are common to all planes.

  };

  class C130Base: Plane {

  // A generic/common base class that is not an actual p3dm model.

  // Should have animations defined that inherit from 'Plane' and additionally specify common animations for all types of C130's.

  };

  class hawAC130: C130Base {

  // A p3dm model specific definition. The name of this class must match the name of the p3dm mlod exactly.

  // This class defines sepcific 'named selections'/'bones'/'sections' and animations for the model 'hawAC130.p3d'

  };

};

The above CfgModels definition is reliant on an external class called 'Default' and must be accessible to binarize.exe during the binarization process.

So, in your example config where is your 'class Vehicle;' defined?

I can see that you probably are already partially aware of how this works but it's not a bad idea to reinforce the structure a bit...

Also, in your CfgModels class you have a defintion for 'ac130', and the skeleton it is using is 'plane'. While this is ok to do, it's not ideal in the sense that I suspect that your 'ac130' model has a skeleton that is specific to an 'ac130' so you should try an use an ac130 type of skeleton and reserve the 'plane' skeleton for use either in very basic fixed wing aircraft (where the skeleton will suffice) or as a generic/common base skeleton.

Your fastest, dirtiest option for progressing further is just to slap a definition in at the start of CfgSkeletons & CfgModels for 'class Vehicle'.

Now, all this use of .cfg's is totally dependant on whether you are binarizing your model or not.

If you are in the habit of not binarizing your models into your end .pbo's then you will need all these definitions sitting inside your config.cpp.

If on the other hand you are binarizing then you can make use of the model.cfg technique.

Personally I binarize all the time, i never turn binarize off in the BinPBO options.

Also, you need to start with a very simple .cfg setup and get just one part moving... then add all the rest...

good luck.

Share this post


Link to post
Share on other sites

Cool, Thanks for the help. Ill post if i get it working.

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  

×