Animation is stuck on first frame, how to fix that?

Hi heltee,

When the animation seems to be stuck on the first frame it can be an indication the actual animation is being forced to restart constantly (which make it look like it’s stuck on frame 1).

If this is the case there might be 2 or more actions (animations) that are conflicting with each other forcing each other to reset.
For example, the player is jumping so the logic is to play the jumping animation, however further down the event it might also detect the player is falling so the logic is to play the fall animation. However this then stops the jumping animation from playing and the fall animation doesn’t get to play either as it’s stopped from playing in the next fame (or logic loop) by the jumping logic etc.

I’d suggest adding some debugging to your events to see exactly what is being triggered. There are multiple ways todo this but I find just logging something to the console works great.

In your actions, type in console and you should find the message option.
image
Add some text you want to appear and make sure its in the same logic area as your animation.

Now run a preview of your game and then when it loads press Ctrl + Shift + I to open the inspector and navigate the the console area and now you can see what is being triggered.
image

As you can see, it seems with just the basic checks (replicating your image) that the falling AND jumping is both being called in the same frame resulting in neither animations being played in full. To fix this you’ll need to look into adding more checks (eg jumping but not falling) or more advanced ways of handling this logic such as FSM.

image

Good luck on your adventure!

3 Likes