Summary
Full Transcript
In this final episode of our Enemy AI & Combat mini-series, we bring everything together by completing our modular enemy framework. Rather than bolting features onto a fragile script, we finish this series the same way we started it — intentionally, cleanly, and built to scale. This time, we introduce two major pieces that every combat system needs: a process for death and a fully modular ranged attack state. First, we implement the death animation created last video. We keep this simple, but make sure our enemy can die (multiple different ways!), and then be removed from the level. Then we build our Ranged Attack state from the ground up. We create a projectile, wire it into the combat system, and structure everything so future enemies can reuse the same foundation. Instead of rewriting behaviour for every new enemy type, we drive variation through values in our Enemy Config Scriptable Object. The goal isn’t just to fire a projectile — it’s to prove that our system can grow without breaking what already works. In this video, we: - Add a clean Death state with animation-triggered transitions - Build a modular Ranged Attack state inside our existing state machine - Create and configure a reusable projectile system - Drive enemy type differences through Scriptable Object config values - Prevent regressions in previously built melee enemies - Highlight common integration mistakes and how to avoid breaking old logic By the end of this episode, our enemy framework supports melee and ranged combat, clean death handling, and scalable configuration — all without rewriting our original foundation. This is the payoff of building things modularly from the beginning. 👀 What This Means Going Forward ⚔️ New enemy types created through configuration, not duplication 🏹 Expandable projectile behaviours 🧠 Clean state-driven AI ready for future complexity 🎟️ Early Access Early access episodes are available for YouTube Members and Patreon supporters. 👉 patreon.com/NightRunStudio 🔗 Assets Used in PROJECT (Free for Commercial Use!) → Mattz Art’s Kobold Warrior Pack https://xzany.itch.io/kobold-warrior-2d-pixel-art → Mattz Art’s Kobold Warrior Pack https://xzany.itch.io/flying-demon-2d-pixel-art → Minimal Fantasy GUI by Eta https://etahoshi.itch.io/minimal-fantasy-gui-by-eta → Unique Free Spell Icons by Marvyra https://marvyra.itch.io/unique-free-8-bit-spells/devlog/859741/my-free-8-bit-spells-is-now-available → Frostwindz Priest Animations https://frostwindz.itch.io/pixel-art-vfx-priest → Frostwindz Lightning Animations https://frostwindz.itch.io/pixel-art-skill-animations-lightning → Otsoga’s Training Dummy https://otsoga.itch.io/training-dummy → Brullov’s Generic Character v.0.2 https://brullov.itch.io/generic-char-asset → Brullov’s Castle of Despair https://brullov.itch.io/2d-platformer-asset-pack-castle-of-despair → Szadi’s Pixel Fantasy Caves https://szadiart.itch.io/pixel-fantasy-caves
