Controllers

In this example, we will give PlayerController the ability to take and apply damage. This is done once the AI is finished, and you'll be able to fight the AI. Also, as we will use AI Perception in this course, we should register the Stimuli source for our controller. Next, we will set up the AIController. We will give it the ability to sense stimuli. Then, we will create an Actor component, which will contain the function needed to update Behavior Tree.

Let's move on and begin to create these base components, as follows:

  1. In the AI folder, right-click and select Blueprint. Then, from the options, select Player Controller. Then, we want to name this OutController.
  2. Open Event Graph and find Event BeginPlay.
  3. Right-click nearby and search for ...

Get Unreal Engine 4 AI Programming Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.