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

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...

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