Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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

Behavior Trees

Behavior Trees act as flowcharts to determine the actions of an AI. Much like the Animation Blueprint, we can use external variables to determine which paths the Behavior Tree takes.

To see this in action, let's create our own Behavior Tree and replace the simple code we've created for our AI with it.

Creating and running a Behavior Tree

Behavior Trees are created like most other assets, so let's head into the Content Browser:

  1. Go to the ThirdPersonBP\Blueprints folder.
  2. Right-click, and, under the Artificial Intelligence section, select Behavior Tree.
  3. Name it EnemyBehavior.
  4. Before we start using this asset, let's set up our EnemyController to use it. Open the EnemyController blueprint.
    ...
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