3rd and up animations stuck on frame 0

Hello, I’m new to the forum, I’ve been trying to make a horizontal shooter ship game for a few months, and all the obstacles I’ve encountered I’ve managed to overcome with some research on the internet and watching some tutorials.
However, I have a problem that i can´t solve, whenever I want an object to change beyond the second animation, it always gets stuck at frame 0.
The first two work fine.

That´s the script and it works fine, the animations change when the score reaches the number and all animations of the objects (sprites) are fine in the preview, with loop on, etc, but beyond the 3rd it just stay stuck.

When the score is > 1100 the 3 events actions are executed and changing animation play them from start.

Thanks for the answer, the problem is always with the third animation of each sprite, the script goes from animation #0 to #1 without problems, but when it goes to #2 and #3 it gets stuck in the first frame of three.

Each animation has three frames as you can see in the image, it was supposed to loop in each one of them without getting stuck in the first one.
The problem happens in all sprites with more than two animations.

@davy’s answer did answer your question, but it appears you don’t understand it.

When you change sprite animations, if the animation is the same as the current one, then it continues from the current frame. If the animation is different, then the new animation starts from the first frame.

What does this mean? It means when GlobalScore is less than 700 but more than 200, the animation is changed to the same number every game frame. So it isn’t affected the animation plays.

However, when GlobalScore becomes more than 700, it the animation is changed in the first event, and then changed again in the second event but to a different animation to the previous event. Since the second change is to a different animation, the animation starts at frame 0.

Hello, I really didn’t understand the answer, and as I’m a noob at these things I still don’t understand.
Is the fact that I can’t get the sprite to run animation #2 and #3 to do with programming or a limitation of Gdevelop?
How can I solve this situation, any suggestions?
Thanks

It’s the logic that’s flawed. I’ll try to explain it slightly differently:

These events are processed every game frame, about 60 times per second. When GlobalScore is less than 700, event 1 is actioned, every 1/60th of a second. The animation is set to 1 every time. Because the animation number does not change, GDevelop keeps animating without restarting.

However, when GlobalScore is greater than 700, then the first and second events are actioned. The first event sets the animations to 1. Then the second event sets the animation to 2. This is now a different animation (it was 1), and so GDevelop starts the second animation change from the very beginning, frame 0.

All this occurs 60 times per second and gives the appearance the animation being stuck at frame 0.


How to fix this? Like this (I added a scene variable named “AnimationNumber”):

Have a read through it and figure out how it works.

Thank you MrMen, you are my saviour :pray:
It works very well, I’m exporting it now to test it on my phone it works fine on the pc, I was having a lot of trouble figuring it out, I’ve seen a series of tutorials and nothing, so I’ll be able to animate more things, I was always stuck on the third animation.
Thanks again