Weapon State Machine - Godot FPS Series #7 @stayathomedev
Weapon State Machine - Godot FPS Series #7  @stayathomedev
Uploaded December 2025 | Updated November 2026, 2 days ago
Learn to create an FPS weapon state machine in Godot that allows you to fire, consumes ammo, and stops firing when you run out of ammo.

Some minor notes:

- I misnamed the WeaponStateChart node initially and then corrected it. It should be named WeaponStateChart, and not be unique.
- I used the wrong state node for the Weapon State Chart. The Root node should be a Compound node, not a Parallel node.

Also, this recording didn't grab the Godot editor popups for some reason. This will be fixed in future tutorials. Sorry for the confusion!

Next episode we will cover projectile and hitscan weapon setups.

-----------------------------------------------------------------------------------

✅ GET THE SOURCE FILES
patreon.com/posts/make-fps-weapon-145081251

✅ GET THE STARTERKIT PROJECT
patreon.com/posts/make-fps-2-0-134340702

🏆 The FPS Tutorial Series 2.0 Roadmap
stayathomedev.com/blog/fps-series-road-map

🎮 Wishlist My FPS Game, Children of Kronos
store.steampowered.com/app/3640450/Children_of_Kronos/?utm_source=youtube&utm_medium=description&utm_campaign=tutorial

-----------------------------------------------------------------------------------

CHAPTERS

00:00 Start
00:26 Weapon State Machine Script
01:05 Weapon Base State Script
01:58 Weapon Controller Adjustments
02:38 Setting Initial Ammo
03:35 Weapon Firing
04:18 Weapon States
04:38 Weapon Idle State
05:21 Weapon Firing State
06:51 Weapon Empty State
07:19 Creating the Weapon State Chart
08:17 Weapon State Machine
08:52 Connecting State Chart Signals
09:44 Adding Fire Input
10:14 FIX - Pick the Right Root Node
10:58 Set Initial State

-----------------------------------------------------------------------------------

STAYATHOMEDEV ►► stayathomedev.com
TWITTER ►► twitter.com/StayAtHomeDev
BLUESKY ►► https://bsky.app/profile/stayathomedev.bsky.social
MY ITCH.IO PAGE ►► stayathomedev.itch.io
PATREON ►► patreon.com/cw/StayAtHomeDev_

-----------------------------------------------------------------------------------

Resources:
GODOT ENGINE ►► godotengine.org
DOWNLOAD GODOT ►► godotengine.org/download

#godot #gamedev #fpstutorial
Weapon State Machine - Godot FPS Series #75 Games Made in Godot To Inspire You (06/03/25)5 Games Made in Godot To Inspire You5 Games Made in Godot To Inspire You (04/29/26)I Outsourced My Games Steam Assets on Fiverr - Was It Worth It?5 Games Made in Godot To Inspire You5 Games Made in Godot To Inspire You (02/28/26)How To Create A Water Shader 2.0 // Godot 4 Tutorial5 Games Made in Godot To Inspire YouIm Making an FPS Where You Flip Gravity on its Head | Devlog5 Games Made in Godot To Inspire YouGodot Engine Theme Song
StayAtHomeDev |

Weapon State Machine - Godot FPS Series #7

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER