12. Make a Task

Step 12. Make a Task

On this page

Tasks are nodes that "do" things, like move an AI, or adjust Blackboard values. They can have Decorators attached to them.

This Task is basically a re-creation of the Move To node, with one major difference: this Task will have the AI always run towards the Player's Pawn, instead of its location. Also, it helps to break things down and see that if you don't ever execute Finish Execute the Task Node will continue to process, and the AI MoveTo node shows this perfectly.


  1. Open the FollowerBT Behavior Tree by Double-clicking it in the Content Browser.

  2. Click New Task button.

    It will create in the same folder as the Behavior Tree.

  3. Rename it in the Content Browser to "RapidMoveTo".

  4. The editor should have already opened it for editing, but if not, Double-click it in the Content Browser.

  5. Create the following graph:

    Copy Example

    Click the image to expand it, or click here to open it in the window.


    The variable names, types, and values for this Blueprint:

    Variable Name








    None - However, this variable has its "Editable" flag set to True so you can change it, per instance, on the Behavior Tree.

Here is what is going on in this graph:

  1. The Event Receive Execute is the event that is called when the Behavior Tree runs this task node.

  2. We store the Follower_AI_CON like we did in the previous step.

  3. The Cast to Actor node pulls the "TargetToFollow" object value from the Blackboard and casts it to an Actor so we can use it in the AI MoveTo node.

  4. On success, the task will run the Finish Execute node successfully.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback