DE EN FR ES IT CZ
Back Back to top

change start frame of an looped animation

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

  • #1, by Lebostein 12 years ago Quote
    I have a sequence of frame files (0-40). I want to loop these frames in an animation. But the start frame should be number 20. How I can do that? Is it possible to "rotate" the place of all frames with an offset of 20? Or can I set a start frame of an animation in Visionaire?

    I have some sequences in that format. I can not renumber all these sequences, but this is a fixed output of an animation tool. And drag/drop of each single frame is not that, what I want. Thanks for hints.
  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by afrlme 12 years ago Quote
    it wouldn't be hard to rename them. Go to file folder > shift select all frames from frame 20 to the last frame & then right click on frame 20 > rename them by deleting the current prefix from the end & replacing with _(0) then press enter. Do the same for frames 0 to 19 but add the next number into the prefix on the end then press enter. Now select all & rename them back to what they were before.

    The whole process should take you maybe 1 minute or less.

    Alternatively drag the frames in the editor, 1 at a time.

    There's also the option of using Lua script to force the frames but it doesn't exactly start from the frame you specify as it forces the animation to only play between the frames you declare. I suppose on animation play you could force the frame to jump to frame 20 & then at the end of the animation you could reset the first frame back to the actual first frame of the loop.

    Either way, each method will take a short while to sort out, so it's up to you which you use.

    inside of an execute a script action in at begin of scene action (animation has to be active (playing or preloaded as soon as soon is opened)
    ActiveAnimations["animation_name"].AnimationFirstFrame = 20
    

    Now edit the last frame of the animation & open up the actions menu & create an execute a script action part containing...
    ActiveAnimations["animation_name"].AnimationFirstFrame = 1
    

    ...remember that "animation_name" should be replaced with actual name of the animation. Also the names are case sensitive.

    Quick note: in Lua the first frame is always 1. So in this case: frame 0 will be 1 & frame 40 will be 41.