Time for action - creating a patrolling AI
An enemy that is guarding something, for example, does not just stand still. This would be very awkward and would break immersion. Usually, this can be solved by giving the AI entity some task or job in the world, which would give his presence much more sense and make him act more lifelike.
In this example, we will create an AI entity that will patrol between some predefined points. We will set this AI to start his patrol when the player enters a particular trigger:
To begin, open a new level where you'd like to place AI, or use the level created in the previous example.
Make sure you have generated the AI navigation for the level by using the AI menu and selecting Generate All Navigation.
Place a SpawnPoint and Proximity Trigger into the level, as we did in the previous examples.
Next, drag-and-drop a Grunt entity from the AI entities in the RollupBar tab.
This Grunt will be our enemy AI.
Place a TagPoint in a location near the AI entity. TagPoint entities...