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
Blueprints Visual Scripting for Unreal engine

You're reading from   Blueprints Visual Scripting for Unreal engine Build professional 3D games with Unreal Engine 4's Visual Scripting system

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher Packt
ISBN-13 9781785286018
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Brenden Sewell Brenden Sewell
Author Profile Icon Brenden Sewell
Brenden Sewell
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Creating enemy wandering behavior


Previously, we set the default behavior for enemies as a patrolling movement between two points. While this worked well as a test bed for our hearing and seeing components, and would be appropriate for a stealth-oriented game, we are going to ramp up the challenge and action of this game's experience by replacing this behavior with random wandering. This will make avoiding enemies significantly harder, encouraging more direct confrontations. To do this, we are going to return to the EnemyBehavior Behavior Tree. Open EnemyBehavior from the Enemy folder in the Content Browser.

Identifying a wander point with a custom task

Once you've opened EnemyBehavior, click on the Blackboard tab. We need to create a key that will store the location of the next destination that the enemy should wander to. Unlike the PatrolPoint key, our destination won't be represented by an in-game actor, but rather by vector coordinates. Create a new key in the Blackboard panel now, 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 €18.99/month. Cancel anytime