Animations stuck at frame 0

Hi, I’m new to GDevelop (but not game maker programs like this) and I need some help figuring out a problem. With a character I’m programming for a platformer game, his animations for “Idle”, “Walking”, and “Jumping” work, but the rest only play one frame, is there any way to fix that problem? I have seen similar issues being discussed here, but I didn’t see any that were actually fixed. Any help would be appreciated.

Hi! Can you provide a screenshot of the issue? ^^;

Do you have any events that stop the animation when the character is not moving, or something of the sort? Sometimes those can end up stopping other animations from playing. Make sure your animation is also set to “Loop” if you want it to loop, as well!
If it’s stuck in frame 0, there’s a big chance it has been paused before it could be played, so you could try using the “Play the animation of Sprite” action and see if it solves the issue!
I hope this helps!

I don’t have any events that stop the animation, the character only has 4 animations currently, but I want to make sure I can get the one that doesn’t work to work so I can do more.
Here’s a screenshot of the current code:

This is for a fangame I’m working on. The animation that isn’t working only has two frames, but I know that it is not changing. I’ve worked on the Clickteam Games Factory 2 prior to this, while it was simpler to animate in that, it did not have problems with playing animation like this.

One thing I noticed is that in the conditions you call the fall animation “Falling”, but in the action where you set the animation you call it just “Fall”. Maybe that has something to do with that? Maybe the conditions aren’t working the way they’re supposed to because of the wrong name?

If it’s not that, I don’t know what else it could be. I don’t see anything else that could be going wrong it.

1 Like

While what you suggested wasn’t the issue (though I think it did help), I found out that making those animations play is complicated. Here’s what I did to solve the problem, the last animation works just fine.


Thanks for your help.

Actually, I just found out that the animation isn’t playing if he’s moving around and falling, that’s something I need to try and figure out now.

I have an idea: Instead of testing for animations, maybe instead try testing for the current action in the Behavior only? Perhaps erase all of these and do something like:

If Player is moving
If Player is falling (inverted)
If Player is jumping (inverted
  do = "Move" to current animation of Player

If Player is falling
  do = "Fall" to current animation of Player

If Player is jumping
  do = "Jump" to current animation of Player

If Player is moving (inverted)
If Player is falling (inverted)
If Player is jumping (inverted)
  do = "Idle" to current animation of Player

No need to repeat too many conditions, these can get pretty tricky. ^v^; I’m so sorry if this still doesn’t help, I just seriously can’t see what the problem could be if not the conditions, considering the Sprites are already set to loop in the Sprite Editor and everything is set up as it should.

AAAAALSO, you seem to have the “Do = “Move” to animation of Vector” inside the “If Key Pressed” event blocks, so maybe that could also be clashing? If you’re already setting the animation to be “Move” ALWAYS when the Player is moving, then why the need to set it to be move when the key is pressed, too? Maybe that’s why the animation doesn’t play correctly when the character is jumping and the arrow is being pressed at the same time? ^v^ Maybe just remove the “Set animation to Move” actions from the “If key pressed” events? I don’t know though, I’m just making wild guesses at this point. I’m so sorry if this still turns out to not be the problem, I tried!

I hope this helps, anyhow!.

2 Likes

I’m an idiot, it was so simple. All I had to do was remove his animation from the keypress sections and the whole thing was cleared up. Thanks for your help, I wouldn’t have figured it out otherwise.

1 Like

Hey, shush, you are not! Things like that can go unnoticed often, shh! And I’m glad I could help! ^^

Not the only one, this just fixed my animations as well :slight_smile: Thanks @MayhemCats!

1 Like

A post was split to a new topic: Animation stuck