Finite State Machines in Godot 4 in Under 10 Minutes

In this video we’ll walk though the setup and creation of a Finite State Machine (FSM) in Godot 4. Finite State Machines are incredibly useful for managing simple states and transitioning between them. For this video we will look at an enemy with the states of wandering, following, and attacking. Then, we’ll build the wander and follow states together in Godot. Resources: Additional State Machine tutorial by GDQuest: Sprout Lands (Tilemap and character): Dino (Dino): Ending music: Chapters: 00:00 Intro 00:27 State Explanation 01:06 Wander State 01:28 Finite State Machine 01:59 Godot Time 02:07 Base State Setup 02:28 State Machine Initial Setup 03:55 Idle State Code 04:40 Testing the Idle State 05:08 Follow State Code 05:40 Testing t
Back to Top