Book Image

Blueprints Visual Scripting for Unreal Engine

By : Brenden Sewell
Book Image

Blueprints Visual Scripting for Unreal Engine

By: Brenden Sewell

Overview of this book

Blueprints Visual Scripting for Unreal Engine is a step-by-step approach to building a fully functional game, one system at a time. Starting with a basic First Person Shooter template, each chapter will extend the prototype to create an increasingly complex and robust game experience. You will progress from creating basic shooting mechanics to gradually more complex systems that will generate user interface elements and intelligent enemy behavior. Focusing on universally applicable skills, the expertise you will develop in utilizing Blueprints can translate to other types of genres. By the time you finish the book, you will have a fully functional First Person Shooter game and the skills necessary to expand on the game to develop an entertaining, memorable experience for your players. From making customizations to player movement to creating new AI and game mechanics from scratch, you will discover everything you need to know to get started with game development using Blueprints and Unreal Engine 4.
Table of Contents (15 chapters)
Blueprints Visual Scripting for Unreal Engine
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Making enemies hear and investigate sounds


Now that our enemy is attacking the player, we want to give some additional attention to the means by which the enemy can detect the player. Enemies that can only pursue players who walk directly in front of them can easily be avoided. To address this, we will take advantage of our PawnSensing component to have the enemy detect nearby sounds that the player makes. If the player makes a sound within the detection range of an enemy, the enemy will walk to the location of that sound to investigate. If they catch the player in their sight, they will make an attempt to attack. Otherwise, they will wait at the location of the sound for a moment before returning to their patrol.

Adding hearing to the Behavior Tree

The first step to introducing any additional functionality to the AI is figuring out where that logic will fit within the Behavior Tree. Go to \ Content Browser, open the Enemy folder, and open EnemyBehavior. We are contemplating adding a sequence...