Wave Based Spawning and Spawner Management
by Jordan Rarrat
Part 1: The Problem
This week, one of my main tasks was refining enemy AI behavior. I decided on using Set Focus from AIController so that the enemy can consistently stay locked onto the closest player however my enemies could not focus and stayed idle.
Part 2: The Solution
I fixed that issue by writing a service node in the behavior tree that runs every tick. this service iterates through all player actors in the world, calculates the distance to each from the enemy and sets the blackboard key to the nearest target. Once the blackboard had the right player assigned, I updated the AI Controller to use SetFocus() on that blackboard value. With this in place enemies now correctly identify and pursue the closest player in real time.
Get Zombats
Zombats
Third-person Ability Shooter
| Status | In development |
| Authors | Wombat Studios, JRarrat, Josh The Dark, iWannaNuhh, aabunada, Devon Flynn |
| Genre | Action |
| Tags | 3D, Third-Person Shooter, Zombies |
More posts
- Damage Feedback: Ragdoll Deaths and Screen FlashJun 27, 2025
- Shattering Expectations - Ben BissettJun 27, 2025
- Sometimes Math is HardJun 27, 2025
- The Journey to Multiplayer, Part 3 - Joshua NewtonJun 26, 2025
- Audio in C++ - Ali AbunadaJun 26, 2025
- Guns and Ballistics - Ben BissettJun 21, 2025
- Proper Ragdolling - Ali AbunadaJun 21, 2025
- The Journey to Multiplayer, Part 2 - Joshua NewtonJun 20, 2025
- Pause Menu DoublingJun 20, 2025
Leave a comment
Log in with itch.io to leave a comment.