Implementing an alert system
In this section, you will work on a system that allows an AI character to alert its fellow minions once it detects a player character. At first glance, you might assume that the code logic to alert nearby AI opponents could be implemented directly inside the minion class – it’s just a matter of sending them a message, isn’t it? But there’s more to it than meets the eye, dear reader. It seems the Lichlord has bigger aspirations for communication than you had anticipated. Fear not, for he has dictated that you make use of a Gameplay Framework class that has lurked unnoticed in the shadows until this moment – the Game Mode.
As you will remember from Chapter 4, Setting Up Your First Multiplayer Environment, a Game Mode is a class that manages a game’s rules and settings – this includes tasks such as communicating with AI Actors in the level. Alerting them of a new intruder in the dungeon is definitely a feature...