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

game optimization - change animation speed with lua?

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

  1. · 9 years ago
    i read about game optimiziation. i have three animations, all the same, but running at different speed. i would love to have only one and change speed with lua. how can i do this?
  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. · 9 years ago
    Technically the field is listed as not scriptable because the new value does not get stored inside of the save files. What you could do is create a value in the editor somewhere & then you could edit the first frame of the animation you want to control the delay values of & create some actions for it...

    if value "animation_speed" is '1'
     execute a script >

    Animations["example"].AnimationPause = 100

    end if
    if value "animation_speed" is '2'
     execute a script >

    Animations["example"].AnimationPause = 200

    end if
    if value "animation_speed" is '3'
     execute a script >

    Animations["example"].AnimationPause = 300

    end if

    Values do get stored in save files, which means each time the animation starts or loops back to frame 1, that it will check the speed it should be playing at.

    P.S: I use a similar method (minus the values) for a faster walk speed when someone double clicks instead of single clicks.
  4. · 9 years ago
    thanks! works perfectly.

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?