Jump to content
Sign in to follow this  
-=ENGENER=-

Anim problem

Recommended Posts

All greetings, I had one problem with animation of model: section move jerky, instead of smoothly, here an example:

how it to correct?

Share this post


Link to post
Share on other sites

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

{

   class house;

   class SmallGateW: house

   {

        skeletonName = "sc9_GBBones";

        sectionsInherit="";

        sections[]={doorL,doorR};

        class Animations

        {

class doorLanim

{

                                         type="rotation";

                                         animPeriod=6;

                                         source="doorL";

                                         selection="doorL";

                                         minValue=0;

                                         maxValue=1;

axis="axis_L";

                                         angle0=0;

angle1=1.7;

                                       

                                     

};

                       class doorRanim

{

                                         type="rotation";

                                         animPeriod=6;

                                         source="doorR";

                                         selection="doorR";

                                         minValue=0;

                                         maxValue=1;

axis="axis_R";

                                         angle0=0;

angle1=-1.7;

                                       

};

        }; /* Animation class end */

   };

};

Share this post


Link to post
Share on other sites

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

{

class sc9_GBBones

{

isDiscrete=1;

skeletonInherit = "";

skeletonBones[]=

{

"doorR","",

"doorL","",

};

};

};

Share this post


Link to post
Share on other sites

arma will crash if you use such a config wink_o.gif due to extra , in skeletonBones[]=

i don't know how it's working now

Share this post


Link to post
Share on other sites

bdfy was referring to:

Quote[/b] ]class CfgSkeletons

{

  class sc9_GBBones

  {

       isDiscrete=1;

       skeletonInherit = "";

       skeletonBones[]=

       {    

            "doorR","",

            "doorL","", << The last , before the }; isn't needed.

       };

  };

};

Try:

Quote[/b] ]class CfgSkeletons

{

  class sc9_GBBones

  {

       isDiscrete=1;

       skeletonInherit = "";

       skeletonBones[]=

       {    

            "doorR","",

            "doorL",""  

       };

  };

};

Share this post


Link to post
Share on other sites

Ok, try this one, fiddle about with it to add the relevant info into the subclasses in class Animations and change any names that need changed:

<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 sc9_GBBones : Default

{

skeletonInherit = "Default";

skeletonBones[] =

{

"doorR","",

"doorL",""

};

};

};

class CfgModels

{

class Default;

class SmallGateW: Default

{

skeletonName="sc9_GBBones";

sections[]=

{

"doorL",

"doorR"

};

class Animations

{

class doorLanim

{

....

....

....

etc

};

class doorLanim

{

....

....

....

etc

};

};

};

};

Planck

Share this post


Link to post
Share on other sites

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

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

class bazefaddons

{

units[] = {SmallGateW};

weapons[] = {};

requiredVersion = 1.08;

};

};

class CfgVehicleClasses

{

           class bazefaddons

         {

            displayName = "ENGENER BAZEF";

          };

};

class CfgSkeletons

  {

   class Default;

   class sc9_GBBones : Default

   {

        isDiscrete=1;

        skeletonInherit = "Default";

        skeletonBones[]=

        {    

             "doorR","",

             "doorL",""    

        };

   };

 };

class cfgModels

{

   class Default

   class SmallGateW: Default

   {

        skeletonName = "sc9_GBBones";

       

        sections[]=

{

"doorL",

"doorR"

};

        class Animations

        {

class doorLanim

{

                                         type="rotation";

                                         animPeriod=6;

                                         source="doorL";

                                         selection="doorL";

                                         minValue=0;

                                         maxValue=1;

axis="axis_L";

                                         angle0=0;

angle1=1.7;

                                       

                                     

};

                       class doorRanim

{

                                         type="rotation";

                                         animPeriod=6;

                                         source="doorR";

                                         selection="doorR";

                                         minValue=0;

                                         maxValue=1;

axis="axis_R";

                                         angle0=0;

angle1=-1.7;

                                       

};

        }; /* Animation class end */

   };

};

class CfgVehicles  

{

class house;

class SmallGateW : house

{

   model="\BAZEF\Abm\SmallGateW.p3d";

   armor=200;

                               destrType = "DestructNo";

   scope=2;

                               sound="";

                               irTarget=0;

                               animated = 1;

                               placement = "vertical";

   vehicleClass="bazefaddons";

               displayName="Small Gate (W)";

                  class AnimationSources

{

class  doorL

{

source = "user"; //The controller is defined as a user animation.

                                         animPeriod =6;  //The animation period used for this controller.

                                         initPhase=0;     //Initial phase when object is created. 0 = CLOSED

};

                                         class  doorR

{

source = "user"; //The controller is defined as a user animation.

                                         animPeriod =6;  //The animation period used for this  controller.

                                         initPhase=0;     //Initial phase when object is created. 0 = CLOSED

};

};

                                     

class UserActions {

class Open_Gate

{

                                                       displayNameDefault="$STR_DN_OUT_O_DOOR_DEFAULT";

displayName="$STR_DN_OUT_O_DOOR";

position="open_pos";

radius=2.000000;

onlyForPlayer = false;

condition="alive this";

statement=" this animate [""doorLanim"", 1]; this animate

[""doorRanim"", 1]; this  say ""opensound"" ";

};

                                          class Close_Gate

{

                                                       displayNameDefault="$STR_DN_OUT_C_DOOR_DEFAULT";

displayName="$STR_DN_OUT_C_DOOR";

position="open_pos";

radius=2.000000;

onlyForPlayer = false;

condition="alive this";

statement=" this animate [""doorLanim"", 0]; this animate

[""doorRanim"", 0]; this  say ""closesound"" ";

};

};

class MarkerLights {

class WhiteBlinking {

name = "svet";

color[] = {1.000000, 1.000000, 1.000000, 1};

ambient[] = {1.000000, 1.000000, 1.000000, 1};

brightness = 0.010000;

blinking = 0;

};

                                         class WhiteBlinking2 {

name = "svet2";

color[] = {1.000000, 1.000000, 1.000000, 1};

ambient[] = {1.000000, 1.000000, 1.000000, 1};

brightness = 0.010000;

blinking = 0;

};

                                         class WhiteBlinking3 {

name = "svet3";

color[] = {1.000000, 1.000000, 1.000000, 1};

ambient[] = {1.000000, 1.000000, 1.000000, 1};

brightness = 0.010000;

blinking = 0;

};

                                         class WhiteBlinking4 {

name = "svet4";

color[] = {1.000000, 1.000000, 1.000000, 1};

ambient[] = {1.000000, 1.000000, 1.000000, 1};

brightness = 0.010000;

blinking = 0;

};

};

};

class SmallWallW : house

{

   model="\BAZEF\Abm\SmallWallW.p3d";

   armor=200;

                               destrType = "DestructNo";

   scope=2;

                               sound="";

                               irTarget=0;

                               animated = 1;

                               placement = "vertical";

   vehicleClass="bazefaddons";

               displayName="Small Wall (W)";

};

class SmallTowerW : house

{

   model="\BAZEF\Abm\SmallTowerW.p3d";

   armor=200;

                               destrType = "DestructNo";

   scope=2;

                               sound="";

                               irTarget=0;

                               animated = 1;

                               placement = "vertical";

   vehicleClass="bazefaddons";

               displayName="Small Tower (W)";

};

};

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> File bazef\config.cpp line 51  / cfgModels/ c encountered  instead of {

At all does not work

Share this post


Link to post
Share on other sites
bdfy was referring to:
Quote[/b] ]class CfgSkeletons

{

  class sc9_GBBones

  {

       isDiscrete=1;

       skeletonInherit = "";

       skeletonBones[]=

       {    

            "doorR","",

            "doorL","", << The last , before the }; isn't needed.

       };

  };

};

Try:

Quote[/b] ]class CfgSkeletons

{

  class sc9_GBBones

  {

       isDiscrete=1;

       skeletonInherit = "";

       skeletonBones[]=

       {    

            "doorR","",

            "doorL",""  

       };

  };

};

This , near }; makes difference? I have it in my configs, and everything works fine.

Share this post


Link to post
Share on other sites

-=ENGENER=-

you get the error

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">File bazef\config.cpp line 51  / cfgModels/ c encountered  instead of {

Because in

<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 SmallGateW: Default

  {

       skeletonName = "sc9_GBBones";

     

       sections[]=

{

"doorL",

"doorR"

};

You forgot to add ; after class Deafult.

Also i recommend using BinPBo(if you are not doing it already), because after binirization, it gives you Log file of all errors and warnings, your config has more problems. Because with your config i get those warnings  <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">File p:\nefolder\config.cpp, line 128: Config: End of line encountered after  this animate ["doorLanim", 0]; this animate

["doorRanim", 1]; this  say "opensound"

Share this post


Link to post
Share on other sites

-=ENGENER=-

Also in your config you have

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

condition="alive this";

I think it should be something like that

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">condition="this animationPhase ""doorlanim"" < 0.4";

""..........."" here, you basically put what you defined in class Animations. In your case its doorLanim. And play around with value after <

This is how i did doors on my satic object.

Share this post


Link to post
Share on other sites

If your animation works correctly throw off please p3d end config, there are no forces already more banghead.gifbanghead.gifgoodnight.gif

Share this post


Link to post
Share on other sites
It is necessary so to understand that for you too does not work correctly banghead.gif

Actually it doesn't work for me too, closes the same way as in your video... Though its the same way as it was done in OFP.... goodnight.gif

Share this post


Link to post
Share on other sites

In your cfgVehicles animation sources, try changing the animperiods to:

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

Share this post


Link to post
Share on other sites
In your cfgVehicles animation sources, try changing the animperiods to:

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

This will make his gate open and close instantly in 0.001 seconds, what he is trying to make is smooth animation, jsut as you see on some ArmA houses.

Share this post


Link to post
Share on other sites
Quote[/b] ]This will make his gate open and close instantly in 0.001 seconds, what he is trying to make is smooth animation, jsut as you see on some ArmA houses.

Not instantly, but it will be quicker and use smaller animation steps.

I figure he can find the ideal speed setting himself, once he gets a chance to see both extremes.

Share this post


Link to post
Share on other sites
Quote[/b] ]This will make his gate open and close instantly in 0.001 seconds, what he is trying to make is smooth animation, jsut as you see on some ArmA houses.

Not instantly, but it will be quicker and use smaller animation steps.

I figure he can find the ideal speed setting himself, once he gets a chance to see both extremes.

Well in BIS config is set to 1, but don't know the value of animperiod in model.cfg though... And it probably depends on agnle of open door.

Share this post


Link to post
Share on other sites

In MI24 from RXC animation of doors of a passenger compartment normal, can be they in a rate

Share this post


Link to post
Share on other sites

Who knows where it is possible to get an example with correctly working animation on a class house (р3d not binarezed end config)& crazy_o.gif

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  

×