Giving our AI choice

In this chapter, we focused on creating AI with multiple states using Behavior Tree. We also talked briefly about using EQS on the dog to randomly choose an area within its location. This particular example was simple, but when you begin to use filters, the power of EQS shines.

For example, you wanted to get all the enemies within 500 units of your location and eliminate those who aren't within the line of sight. Then, we cleared any enemies not within a 60-degree view angle. Lastly, we got the one closest to the character.

In Blueprint, this can be done, but it then requires you to put it in either Blueprint Library or a node. If we make it in EQS, we are only required to create the conditions in the UI. However, it's easier ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.