Creating a custom decorator using blueprint

We should add one more decorator to the parent selector node before we continue. Even though there is an acceptance radius that we specified on the AIMoveTo node within the BMMoveTo task, we should add a decorator that will only call this event if the AI is outside a certain range to the player. Unfortunately, this check does not already exist so we have to again create our own. We can do this by clicking the New Decorator button in the BT editor. This will generate a blueprint decorator and open the blueprint editor. Be sure to rename this decorator to BMCloseEnough.

The editor for tasks, services, and decorators is all the same. However, this time we are going to be overriding a different function. ...

Get Unreal Engine 4.X By Example 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.