I wrote "just use a match statement, it's fine" three times before I stopped saying it. It is fine, right up until an enemy needs a fourth state and two of the transitions start depending on each other. Here is what actually cost time building enemy AI for a wave-based game, in the order it bit...

Source: [Dev.to](https://dev.to/saltmire/what-i-learned-building-an-enemy-state-machine-in-godot-4-2h3d)

Sponsored