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 ...
Get Blueprints Visual Scripting for Unreal Engine now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.