Placing the enemy AI

In this recipe, we will show how you may place down simple AI grunts from the Entities rollout for the player to fight against.

Getting ready

  • Before we begin, you must have the Sandbox 3 open
  • Then open My_Level.cry

How to do it...

  1. In the RollupBar, click on the Entity button.
  2. Under the AI folder, find Grunt.
  3. With the Follow Terrain enabled, click-and-drag anywhere on your terrain.

How it works...

The Grunt is a simple AI entity that packages a whole lot of extra properties that we will touch on later in this chapter. The Grunt itself is a simplistic human AI that borrows a lot of its functionality from the basic actor defined in LUA, which means it shares a lot of the human characteristics which the player also utilizes, such as movement.

There's more...

The AI can be placed as Entity Archetypes. Although not essential, it is a very good practice for the development team to create templates of enemies for the player to fight (a.k.a. Archetypes). These Archetypes will hold any of the properties such as attackrange, FOV, Health, and other properties that designers want these AI to have across their entire game. The Archetype Library can be found in the Database view.

See also

  • The Creating Prefabs to store in the external libraries recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.89.18