Assaults give the AI a goal. In our last example, the soldiers in the map had one goal—to hunt the player. The nodes we placed in the level helped to guide the AI in both navigation and for seeking defense. We can use the same process to script AI versus AI battles. Load the ch10_example04
example map to see a house held by citizens and an outside area filled with combine soldiers. You can also create your own scenario if you wish.
The map is littered with info nodes and hint nodes. There are also hint_nodes in the windows. These are set to be visually interesting but only for NPCs outside of the house. The FOV is 180 degrees with the hint angle pointing outside the house. We want only the soldiers to focus on the windows so that they will be ready when the citizens appear in them. Run the map and see what happens.
Have a look at the preceding image. You'll notice that the soldiers aren't storming the house, and the citizens aren't going outdoors to meet them. The combine...