O'Reilly logo

Unreal Engine Game Development Cookbook by John P. Doran

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required