Tips for implementing an AI alarm system in a stealth game

I’m working on the alarm subsystem in a stealth game. The level has several NPC squads patrolling designated areas. If the player is spotted, NPCs in that area will aggro. NPCs in other areas should go into aggressive patrol mode (running around, weapons at the ready). The main thing is that when the alarm is raised, the player is not attacked by all NPCs on the level. :slight_smile: Likewise, the alarm system must choose which NPC will react to player distraction actions (thrown stone, sound, etc.) It’s also bad if the player throws a stone and all the guards who heard the sound come running at once. :slight_smile:

I’m looking for an elegant, easily modifiable solution for orchestrating the business logic of multiple AI agents. I’m currently thinking about this solution:

Create an invisible actor-NPC manager, commanding the NPC. Each NPC squad has one actor-commander. NPCs notify the commander of events and the commander decides how to react. High-level business logic is described in blueprints and is quite simple.

Interested to hear the community’s opinion. Maybe there is a more elegant solution?