Перейти к содержимому

Weapon State Machine - Godot FPS Series #7

StayAtHomeDev

0:00 / 0:00

Weapon State Machine - Godot FPS Series #7

8 187 просмотров · 10 мес. назад
StayAtHomeDev
70 тыс. подписчиков
8 187 просмотров · 10 мес. назад
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   / make-fps-weapon-145081251   ✅ GET THE STARTERKIT PROJECT   / make-fps-2-0-134340702   🏆 The FPS Tutorial Series 2.0 Roadmap https://www.stayathomedev.com/blog/fp... 🎮 Wishlist My FPS Game, Children of Kronos https://store.steampowered.com/app/36... ----------------------------------------------------------------------------------- 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 ►► https://stayathomedev.com TWITTER ►►   / stayathomedev   BLUESKY ►► https://bsky.app/profile/stayathomede... MY ITCH.IO PAGE ►► https://stayathomedev.itch.io/ PATREON ►►   / stayathomedev_   ----------------------------------------------------------------------------------- Resources: GODOT ENGINE ►► https://godotengine.org/ DOWNLOAD GODOT ►► https://godotengine.org/download #godot #gamedev #fpstutorial