Looping certain portion of any animation

Hello, I want to loop a certain portion of my animated sprite from frame 10 to 20, however i want to play the frames 0 to 10 once before and then the looping starts from 10. Both are part of the same animation, can anyone help?

Hi!
First, turn off loop of the animation itself:


At the refresh icon, make sure it is not blue (not active).

We disabled that since we will loop it manually, at that specific frame.
Next, create an event with condition to check animation name (you can use animation number, if you know how), and that the animation has finished playing.
For the events, we change the current frame directly to 10 (or 9 since frame start from 0?), and add event to play the animation again, since it is not playing after it ended.

1 Like

Hi,
You could also move the first ten frames to another animation.
Switch to animation #1.
When #1 is finished, go to #2 (looped).

thats what i am trying to do, but couldn`t find the necessry commands and actions!

Hey Gruk, I did that but it only happens once…used hide and show to switch animation 1 and 2. But it only happens once in the begining…thats it

If it only happens once, there’s something wrong with your conditions I guess, but I can’t help without seeing the events :man_shrugging:

well yes, sure…tony_slide is the first part of the animation that i want to play once and slide is the second part that will be on loop

You didn’t need to use two objects, you could use two animations for the same object.

The problem here is that you use “play animation” like “reset and play”. “play” is useful when you paused the animation.
What you need is:
image
to reset the animation (it will play)