2008 Sep. 21
Spawning AI Units
The next step in creating a map is to be able to spawn humans or aliens. The Crytek artificial intelligence system is really advanced compared to the previous game generation. You no longer have to script every single movement the AI classes have to perform and have great flexibility in controlling their actions. This tutorial will not go in depth with AI stuff... I'll write a complete tutorial on this later. I'll only handle the very basic action of spawning an AI class and letting it go around in the map, attacking you if you cross it's view port.
In the top menu, click on View > Open View Pane > Database View. Click on the Load Library button as shown below and pick one of the xml description files (for example, asian_new.xml).

|
Close the Database View window and head over to your Rollup Bar. Click on the Archetype Entity and you should see the data loaded from your XML file. Open one of the sub-folders and drap & drop one of the classes directly onto your map (e.g Heavy_Rifleman_a1). If it displays a tiny human icon, it means the AI class is not working. Try dragging another until you have a fully working model.
Use the move & rotate buttons in the top toolbar to get your AI class facing the appropriate direction :
Your AI won't work right now. You have a last step you must never forget : AI classes need navigation data to know which parts of the map they can access and how they have to interact with environments. In order to do this, you have to generate the navigation information. In the menu, click on AI > Generate all navigation. You can now have a run in your map and fight with your first AI class. |
![]() |






