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

Connecting UI values to player variables


To allow our UI elements to pull data from our player variables, we will need to revisit the HUD widget Blueprint. Navigate to the FirstPersonExampleMap tab, go to the Content Browser panel, and open the HUD widget Blueprint in the UI folder.

Creating bindings for health and stamina

In order to get our UI to update with the player stats, we will be creating a binding. Bindings give the ability to tie functions or properties of a Blueprint to a widget. Whenever the property or function is updated, that change is reflected in the widget automatically. So, instead of manually updating both the player health stat and our widget every time the player takes damage (so that the health meter display changes), we can tie the meter to a player value—health. Then only one value needs to be updated.

In the HUD Blueprint editor, find the Hierarchy panel and click on the Health Bar object nested underneath the Player Stats Bars object. With the Health Bar now selected...