Creating a Health/Damage system, part 2 – creating a healthbar
Something that you'll be using often as a game developer is some kind of healthbar. In this recipe, we will learn how to display a healthbar on the screen that will update based off of the values of variables inside of blueprints.
Before we start working on this, we need to have a project created and set up for our character. To do this, complete the Creating a Health/Damage system, part 1 – taking damage recipe in Chapter 8, Blueprint Scripting – Level Effects.
How to do it…
Let's see how we can use the UMG editor to display a healthbar:
- From the Content Browser tab, select the
Contentfolder and then click on the Add New button and select New Folder. Name this new folder ...