Building the C++ logic
You are probably guessing that we are going to create an enemy
class that will hold the logic for our enemy. As I mentioned earlier, I'll not be inheriting several AI classes from each other, as I will have only one enemy. But, in fact, we are going to create two new classes for the project based on the base class of each. The new classes will be as follows:
Enemy
: This class will be based on theACharacter
class, which means that it will have a lot of properties, such as our gladiator, asGladiator
as well is inherited fromCharacter
.EnemyAIController
: This one will be based on AAIController. While the ACharacter-based class takes its movement through inputs, the AAIController-based class takes its movement through the environment, the navigation mesh, for example.
Now, after adding both the classes and before we start doing anything within Visual Studio, you will find yourself able to differentiate between them via their icons. This is how both look in my project...