state-machine

Installation
SKILL.md

State Machines in Godot 4.3+

Choose the right FSM pattern for your complexity level. All examples target Godot 4.3+ with no deprecated APIs.

Related skills: player-controller for movement state integration, ai-navigation for AI state patterns, resource-pattern for resource-based state configuration, animation-system for AnimationTree states driven by FSM, dialogue-system for dialogue flow as a state machine, ability-system for caster state gating (casting/stunned), limboai for the LimboAI addon's HSM (BTState) if you need a behavior tree alongside your FSM, beehave for a GDScript-only BT alternative.

When to reach for an addon: This skill covers the built-in FSM patterns (enum, node-based, resource-based). If your agent needs a full behavior tree, see limboai (C++ + HSM, Godot 4.6+) or beehave (pure GDScript, Godot 4.1+) instead.


1. Approach Comparison

Approach Complexity Best For
Enum-Based Low Simple objects, fewer than 5 states
Node-Based Medium Characters with complex behavior
Resource-Based High Data-driven or editor-configurable AI

When you recommend one, name the approach you rejected and the factor that decided it (state count, independent concerns, designer editing) — "node-based, not an enum with match, because seven states with their own enter/exit logic outgrow one script". A pick with no named alternative cannot be overruled.

Installs
186
GitHub Stars
881
First Seen
Apr 14, 2026