Is it possible to repeat the same image on different frames for flipbook animation?

Hi! I’m new to Defold.
My question is if there’s a method to do a 12 frames animation with only 3 images, that will go forward, then in reverse.

For example, the idle animation will be:

Frames 1-3 = Image 1
Frames 4-6 = Image 2
Frames 7-9 = Image 3
Frames 10-12 = Image 2

In addition, a variant in which the character will blink:

Frames 1-3 = Image 1
Frame 4 = Image 4
Frame 5 = Image 5
Frame 6 = Image 4
Frames 7-9 = Image 3
Frames 10-12 = Image 2

→ Image 4 and Image 5 being variation of Image 2 in which the character has the eyes half closed and fully closed.

Since I can see the edit button, I’ll post this as a reply, but I found a workaround by setting the animation to Ping Pong Loop and the frame rate to 3. If there’s a better method I’ll be glad to hear it.

You can add the same image multiple times to an animation.

How can I do that without copying the same file multiple times?

Reusing the same image in an atlas animation doesn’t make a copy of it, it just holds a reference to the part of the atlas where the image is located.

2 Likes

I see, thanks for the clarification. This is different than using keyframes as I’m used.