I need a state machine and having Problems when my game is being tested the animations won't go past 2

Hello!

For your questions:

  • Is there a limit on how many animations you can have in one object?
    • Nope! I currently have about 20+ animations on one character in the main game, but there’s no theoretical limit on animations.
  • Is there a workaround to your animations not playing? Yes, very likely .The biggest issue is likely going to your events having conflicts or missing criteria (such as not using “trigger once” when changing animations), or both.

Unfortunately, in general people on the forums won’t build out your events for you. I would recommend a few things:

  1. Review the Finite State Machine tutorial here: How to handle complex logic – The finite state machine (FSM) [GDevelop wiki]
  2. Go through the entire tutorial step by step.
  3. Once you’ve completed the tutorial, try adding another state from what you learned.
  4. As long as you can complete that, you should be able to rebuild your events to have the type of state machine you need.

You can also find an example here: [State machine] with 3 attacks, 3 air attacks, dash, wall jump

Also, more details about the concept behind state machines here: Working with Game States and Finite State Machine

I hope this helps!

2 Likes