Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine 4 Game Development Quick Start Guide

You're reading from   Unreal Engine 4 Game Development Quick Start Guide Programming professional 3D games with Unreal Engine 4

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789950687
Length 202 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rachel Cordone Rachel Cordone
Author Profile Icon Rachel Cordone
Rachel Cordone
Arrow right icon
View More author details
Toc

Creating a Behavior Tree task

Tasks are created as separate Blueprint assets, and, by default, will be created in the same folder as the Behavior Tree. The easiest way to create them is directly from the Behavior Tree, so let's do that now:

  1. At the top of our EnemyBehavior window, click on the New Task button. This will create the asset and open it up for us.
  2. The names given to new tasks by default are not useful, so let's go into the ThirdPersonBP\Blueprints folder and find the Task. (The icon will be a hollow circle, and its name will start with BTTask_BlueprintBase_New.) Rename it BT_GetRandomLocation.

Back in the task's Blueprint, instead of using an Event, such as BeginPlay, Tasks have their own set of events:

The most common one is Receive Execute AI, which is called each time the Behavior Tree branches onto this task. This event has Owner Controller and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image