Let's start!

Open up Unreal Engine 4, and let's start a new Third Person template project. We want this so that we can use the Third Person pawn as one of our AI-controlled pawns. So, select the settings as in the following screenshot and hit Create Project:

Let's start!

Next, we want to create our new AIController, and this will be responsible for telling our pawn to move between two points. The plan is to introduce some obstacles to see the effect we can have on the pathing of our AI. Perform the following steps:

  1. Let's start by going into the Blueprint folder. Right-click to create a new AIController class and name it SoldierAI. This AIController will be responsible for navigating the pawn provided by the starter content.
  2. Remove the pawn from the level initially set up by Content Example. Then, we want to place two new ThirdPersonCharacter pawns in the level across from each other. Next, we want to open up this ThirdPersonCharacter blueprint and access its default values.
  3. From here, let's find this pawn's default AIController and change this value to our new AIController class named SoldierAI. What this will do is always spawn our pawn with our AIController:
    Let's start!

Save all! Let's proceed to the next part of this chapter!

..................Content has been hidden....................

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