License from €75 Log in
DE EN FR ES IT CZ

Link Animation speed to a value

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 13 years ago
    I would love to be able to slowly ramp up/slow down an animations speed by linking it to a value.
    Is there way to do this that I'm just not seeing?
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 13 years ago
    The only thing I'm seeing for this is "AnimationPause" in the data tructure but according to the data structure it is not scriptable but you can still try it, as the script status is not always correct...
    getObject("Animations[add animation name here]"):setValue(VAnimationPause, add value here)
    
    --example
    getObject("Animations[walk_west]"):setValue(VAnimationPause, 150) -- set delay value between frames of "walk_west" to 150ms
    
  4. · 12 years ago
    It works! Now I can change the speed of my minigame.
  5. · 12 years ago
    Yeah it works in current session. I believe the reason it said unscriptable on the data structure page of the wiki is because the new value does not get stored into the save file data when you save your game.

    You can make the line of script even smaller than the example I wrote above...
    Animations["test"].AnimationPause = 150
    

    ... there's no reason to use the getObject method seeing as we have the shorthand access method available since 4.x. wink
  6. · 12 years ago
    Yes it's much better with the new method: now I can remember it more easily smile

    This script can be very useful. It makes it possible to create a button to increase or decrease the speed of an animation.
  7. · 12 years ago
    Yep. It's also possible to control the play order (forwards / reverse / random) of an active animation. The position of an active animation. The active frames (from x to y frame). Whether the animation has a random pause between each loop & the min - max duration of the random pause value. All in all, they allow you to get pretty creative with animations. wink

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?