[SOLVED] Variable animation activation problem

Hi so I have figured out an issue or at least the cause but I don’t know how to fix it.

If I use a Boolean variable such as if “Wall_Sliding” is true, Then change to “Wall_Sliding” animation it only shows the first frame of the animation. This happens for every animation that’s dictated by a variable, they get stuck on frame one. Is there a way around this. As when I try to trigger the wall slide animation without a variable it just flips between it and falling.

I’m using the wall slide logic extension if that helps. Anyone have any logic ideas for making the animations around wall jumping and sliding. I put all my code up in a previous post if that helps.

Please send a screenshot of all animation events you have (not only the important one)

A sprite getting stuck on the first frame is an indication that the sprites are getting changed at least twice in each game frame. Here is a recent post by @BigChalkGames explaining it, and here is a link to an earlier one addressing the same issue.

Thanks, the message below has given me a good idea on how to fix it.

Many thanks, this, or at least the post in the link was exactly what I needed. Cheers

1 Like

So wanted to say an extra thank you. By following your links I discovered the concept of Finite State Machines. By re-processing my code into a FSM I managed to solve all the animation issues and lose about 50 lines of logic that were not needed. Big win for my learning on my game development journey.

1 Like