Addons & Mods Depot > ArmA - Configs & Scripting

Moving 'user' animation to 'direct' animation.

(1/1)

i0n0s:
I have some animation which source type 'user' and want to change them to 'direct'. When I simple replace user with direct, the result seems to be a combined animation of the two types:


--- Code: (config.cpp) ---class AnimationSources {
class Contract0 {
source = "user";
animPeriod = 0.001;
initPhase = 0;
};
class Lift0: Contract0 {};
};
--- End code ---

--- Code: (model.cfg) ---class Animations {
class Contract0 {
type = "translationX";
animPeriod = 0.001;
source = "user";
selection = "Segment01";
axis ="center_start";
minValue = 0.0;
maxValue = 1000;
offset0 = 0;
offset1 = 1000;
};
class Lift0: Contract0 {
type = "translationy";
minValue = -100;
maxValue = 100;
offset0 = -100;
offset1 = 100;
};
};
--- End code ---

It works fine with the 'user' source, but the animPeriod is noticeable and should get removed via 'direct'.
Anyone knows how to do this or what is missing?

DeanosBeano:

 well you probably picked the hardes anim to find any info :).
 i only know of the Nodding donkey or oil pump that uses it and in the first releases including the mlods , it wasnt working propperly, BIS fixed it in a Hotfix but unfortunately didnt release any info on why and how the fix was implemented.

i think these where the guts of the anims but again i think i discovered it was the p3d that was forked so couldnt get a fix .

model.cfg


--- Code: --- class Animations
    {
    class Animations
    {
      class dbo_ropa_anim1_0
      {
      type="direct";
        source="dbo_ropa_anim";
      selection="tyce";
        axis = "osa_tyce2";
      minValue=0.0;
      maxValue=0.15;
      axisDir[]={1,0,0};
      axisPos[]={0,0,0};
      axisOffset=0.0;
      angle=8;
      };
--- End code ---

  and cpp


--- Code: ---class AnimationSources
{
class dbo_ropa_anim
{
source = "time";
sourceAddress = loop;
};
};;
--- End code ---

 its been so long i could not tell you if i got it to work though, it was frustrating as i was using it in an island like bis so 5 x the  messing about.

 

T_D:
why not using animPeriod = 0 ?

DeanosBeano:
 
 "why not using animPeriod = 0 ?"

Animperiod  = 0 will give a default of 1 second simulation step with user anims.

 if he simply want to speed it up then .01 is fastest noticeable for user anims i didnt see any difference between .01 and .001 maybe .01 is framerate i dont know.

  i thought he wanted to have it auto animate when placed in game ,thats what direct is for using a pre defined source such as time , from which you can"time / ,* -"  etc in the model.cfg if you wish to change  .

i0n0s:
I don't know how I can use time to control my model :|

Navigation

[0] Message Index

Go to full version