The plan

We will continue from where we left off in Chapter 2, Creating Basic AI, and continue to make changes to our two AIControllers. In the past chapter, we set up our Enemy to chase our Hero indefinitely. In this chapter, we will introduce another state to our Enemy AI, which will allow it to either run away from us or run toward us. This represents the Enemy attacking us or fleeing, depending on the shock probability when we encounter the Enemy.

Let's get started!

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.