Forbidden areas
Where forbidden boundaries fail to keep the AI from going into certain locations, forbidden areas are used instead. This recipe will teach you how to utilize the forbidden areas to block off the areas that the AI entity should not go to.
Getting ready
Before we begin, you must have Sandbox 3 open
Then open
My_Level.cry
Place down one Grunt AI
Place
default\primitive_cube.cgf
as a brush down near the Grunt AI
How to do it...
In the RollupBar, click on the AI button.
From the Object Type, select ForbiddenArea.
With the Follow Terrain enabled, click four points roughly in a square around the primitive_cube.cgf.
On the Forbidden Area Params, set DisplayerFilled to true.
Generate the AI navigation.
How it works...
You may have noticed that without the forbidden area present around the box, the AI Grunt takes a significantly longer time to find a path to the player and may even get stuck running up against it if the player is behind the box. This is because the AI does not know of the box...