Finite State Machines in Godot 4 in Under 10 Minutes
YouTube Viewers YouTube Viewers
15.9K subscribers
203,833 views
0

 Published On Jun 15, 2023

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: https://www.gdquest.com/tutorial/godo...
Sprout Lands (Tilemap and character): https://cupnooble.itch.io/sprout-land...
Dino (Dino): https://arks.itch.io/dino-characters
Ending music:    • The 25th Hour - Schlatt Crossing  

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 the Follow State
05:58 Transitioning Between States
06:34 Afterthought
07:03 Cow

show more

Share/Embed