Godot Version
Godot 4.2.1
Question
Hello everybody!
I’m learning the state machine pattern, and I’m confused about how to change to a state that can be used in almost any other states.
For example, I have a character that can move around, idle, walk, run, jump, etc. This character can take damage from enemies.
I’m getting confused about how to switch to the damage state when taking damage. Who is responsible for monitoring the damage inflicted and changing to the damage state?
Thank you for your help