Home   Help Search Login Register  

Author Topic: Variable animation speed  (Read 1244 times)

0 Members and 1 Guest are viewing this topic.

Crassus

  • Guest
Variable animation speed
« on: 08 Sep 2005, 10:33:09 »
Note: I used the phrase "variable animation speed" as my search parameter, and nothing came up.

I'm building a static, i.e. player nor AI can neither walk nor run, animation. Is it possible to vary the speed of the animation within the anim's config?

Here's the code: See the bolded part:


*****************
class myAnimation: StandBase
      {
      actions = StandTalkActions;
      file = "\myAnimation\myAnimation.rtm";
      speed = -10.0;
      looped = true;
      soundEnabled = false;
      interpolationSpeed = 1;
      connectFrom[] = {Stand, 1, StandVar2, 1, StandVar3, 1};
      connectTo[] = {Stand, 1, StandVar2, 1, StandVar3, 1};
      interpolateTo[] = {StandDying, 0.1, StandDyingVer2, 0.1};
      };
   };
************************
I'm looking for a variation of just a few seconds.
« Last Edit: 08 Sep 2005, 10:35:30 by Crassus »

Offline bdfy85

  • Contributing Member
  • **
Re:Variable animation speed
« Reply #1 on: 08 Sep 2005, 17:41:53 »
 speed = -10.0;
it's time in seconds  your animation will be played in game  
Liberation Mod scripts&balance

Crassus

  • Guest
Re:Variable animation speed
« Reply #2 on: 08 Sep 2005, 18:56:02 »
I know what it is, friend.  ::)

Perhaps I should have used the word random, rather than variable. In other words, is it possible to use the random command (random real value from 0 to x, as per the ComRef) within the animation's config, well, any config for that matter, but the anim's config in this instance.

Lean Bear

  • Guest
Re:Variable animation speed
« Reply #3 on: 08 Sep 2005, 20:41:32 »
You could, but if its a static animation, there's no point. You just need SPEED_STATIC.

Unless its one of those where although the unit doesn't actually move anywhere, his hands or whatever are still doing something?

In that case, no, not without difficulty. You could just make a series of anims (all the same thing, but with slightly different class names, like: waveAnim1, waveAnim2 etc.). Then make a script so that instead of using _unit switchMove "Anim" you execute the script which randomly chooses on of the anims (ie. one of the speeds) to play :)

Unless I'm wrong and you can actually use:

#Define Your_Anim_Speed {random -10} //or however it goes nowadays

Crassus

  • Guest
Re:Variable animation speed
« Reply #4 on: 08 Sep 2005, 22:58:33 »
Yes, actually, the anim would be similar to the salute, or use binocular anim.

Well, just have to experiment I guess.

Thanks for replying.