Godot 3.2 Tutorial on how to make an enemy attack back, by making use of a state machine.
Once you have the code in place to make the player run and around and shoot. You want your enemy to shoot back at you! In this tutorial, we take the results of ‘The Combat Series’ tutorials and expand on it by giving our enemy some logic.
02:00 Prep the project for more complex events
02:45 Setting up Collision Layers
08:06 First fix and upgrading to accommodate Enemy Stats
11:45 Second fix, prep done
13:36 Enemy Logic State Machine
18:10 The Attack function
27:00 Adjusting the Skill Scene to handle enemy input
29:10 Adjusting the Player to Take Damage
Follow me on Twitch and watch game development happen in front of your eyes, and ask any question: https://twitch.tv/stefan_gamedev
I stream every Tuesday and Thursday from
19:00 to 22:00 (UTC), that’s;
12:00 to 15:00 (PST), or
15:00 to 18:00 (EST).
Follow me on Twitter to get information on my personal game development, new tutorials, vote on polls to determine future tutorials, series, and/or episodes:
GDC, Game Development Center, was created to provide in-depth tutorials on game design and game development with Godot. We aim for multi-part tutorials, allowing us to dive deeper into Godot’s features. You can request tutorials on additional features within a given topic. No promises, but we’ll do our best to make it happen 🙂