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.

Getting ready

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:

  1. From the Content Browser tab, select the Content folder and then click on the Add New button and select New Folder. Name this new folder ...

Get Unreal Engine: Game Development from A to Z now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.