Summary
Keywords
Full Transcript
In this third episode of our Enemy AI mini‑series, we take the next big step toward making our enemies truly dangerous by introducing melee combat. Building on the modular state machine from Parts 1 and 2, we add a dedicated Melee Attack state and new Combat component that handles animations, timing, and damage — all while keeping the system clean, reusable, and data‑driven. This chapter focuses on integrating attack logic into the existing architecture, creating a flexible combat component that will serve as the foundation for both melee and ranged enemies later in the series. In this video, we: - Add a brand‑new Combat state to the enemy state machine - Hook up melee attack animations with precise timing for damage events - Implement a health system for our player - Create an EnemyCombat component to manage cooldowns and prevent spam attacks - Keep everything modular and data‑driven for easy expansion into ranged combat - Lay the groundwork for advanced detection, attack patterns, and reactive AI By the end of this episode, our enemy can detect the player, chase them, and execute melee attacks with proper timing and cooldowns — all within the same scalable architecture we’ve been building since Part 1. This approach ensures that as we move forward, adding new combat styles (like ranged attacks or special abilities) will be smooth and intuitive, without rewriting core systems. 👀 Coming Up: ⚔️ Advanced melee logic — hit detection, knockback, and combo attacks 🔥 Ranged combat — projectile systems and hover movement ⚙️ Expanding the state machine with reactive transitions and counter‑attacks 🎟️ Early Access: Early access episodes are available for YouTube Members and Patreon supporters. 👉 patreon.com/NightRunStudio
