Respawning AI
In this recipe, we will explore how you will be able to utilize the Territory and Wave systems along with a little bit of FlowGraph scripting to make your AI respawn after a couple of seconds of death.
Getting ready
Before we begin, you must have Sandbox 3 open
Then open
My_Level.cry
Place down one Grunt within the level
How to do it...
Making a territory:
From the RollupBar, open the Objects tab and click the Entity button.
Open the AI folder and select AITerritory.
Click down four points to surround the AI Grunt (double-click to finalize).
Placing the AI wave entity:
From the RollupBar, open the Objects tab and click the Entity button.
Open the AI folder and select AIWave>.
Place the AI wave entity close to the AITerritory.
Linking the territory to the wave:
Select AITerritory1 and click the Pick button.
Click AIWave1 to pick that entity as the target.
Giving the AI Grunt the territory and wave IDs:
Select the Grunt.
Under Entity Properties2, assign AITerritory1 as the territory and AIWave1...