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 an enemy attack


If the enemies we create are going to pose a real obstacle that stand in the way of the player achieving the goals we create for them, we will first need to give the enemies the ability to damage the player. In the previous chapter, we set up the basic structure of an enemy attack pattern. It is triggered when the player enters the enemy's line of sight. We are now going to introduce a damage component to this attack, ensuring that there is some consequence of the enemy reaching melee range of the player.

Making an attack task

To create an attack task that does damage, we will be extending the Attack Player sequence we created in the enemy Behavior Tree. Open EnemyBehavior from Content Browser now. From the Behavior Tree view, click on the New Task button and select the BTTask_BlueprintBase option from the drop-down menu that appears. As we did with the custom task to reset key values in the previous chapter, we will want to navigate to the Enemy folder in Content...

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