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 simple UI meters with UMG

To create an HUD (short for Heads-up Display) that will display the amount of health, stamina, and ammo the player currently possesses, we will first need to create variables within the player character that can track these values. To do so, open the FirstPersonCharacter Blueprint from the Blueprints folder of your project. Within the Blueprint, we are going to define variables that will represent additional states that the player and game will care about. Find the Variables category of the My Blueprint panel in the editor. Click on the + sign to add another variable, and call it PlayerHealth. With PlayerHealth selected, find the Details panel and change the variable type to Float.

Also ensure that the box labeled Editable is checked so that other Blueprints and objects can manipulate this variable. When a variable is made editable, it will be shown with a yellow open eye symbol next to its name in the Variables section of the My Blueprint panel.

Follow...

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