Godot Version
4.3
Question
Does anyone have a good examples for Nested StateMachines?
I’m trying to replicate a “AnyState” transition. Which helps a lot in making StateMachines looking cleaner and easy to understand.
The new
Nested
StateMachine is said to be able to replicate this behavior.
It is useful to list several animations, such as StateMnachine with NodeTransition. You can use this like AnyState. Seeking to the beginning is treated as seeking to the beginning of the animation in the current state.
But I couldn’t find any working examples and wasn’t able to make one myself.
I’m not really sure how nested statemachine would replace the anystate behavior, as you don’t set at transitions arrows in the graph.
I’m guessing this is made to work mainly with code using the .travel()?
Which might work, but you can easily lose track of things as you don’t visually see the transition arrows.
Not sure about how this works.
Any examples, tips or hints about how to work with them is appreciated.