Godot Finite State Machine's icon

Godot Finite State Machine 1.0.4 Scripts 3.0 Community

Submitted by user brandonlamb; MIT; 2017-12-12

A finite state machine implemented purely in code (GDScript).

There are various methods to implement an FSM. This one uses state objects, a state machine, and includes a factory to create the state machine.

Logic is contained with the state objects/classes that you create which can tell the state machine to transition to other states. There is support for _on_enter_state and _on_leave_state methods.

Other implementations support features like arbitrary events, timers, and probably just other ways of solving the FSM problem which this library does not do. Rather than your state machine having methods to control transitions, the code is handled via the states themselves which contain a reference to the target object (your player node for example).

View files Download Submit an issue Recent Edits

Sha256 Hash: 3c50496d88514c00263e40bc0247c49c18e238a7e8e42fb1567cf657bdd0aa94