O'Reilly logo

Unreal Engine 4 AI Programming Essentials by Jie Feng, Peter L. Newton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pawn detection

To give our pawn the most up-to-date information, we need to create an event that will catch and respond to the sensory update events from the AI Perception component. We will establish this by creating a new event that is solely responsible for processing detected pawns. Here are the steps:

  1. Let's right-click anywhere and go under Add Event. From there, we want to add a custom event, and we will name the new event Detected Enemies. We have to also create a new actor array parameter named Detected Actors to hold the array of Updated Actors.
  2. Now, in the next step, we need to recompile a blueprint to call the AIController and the Detected Enemies function from our OnPerceptionUpdated event:
  3. In the next steps, we will handle the transitions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required