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

Dynamic enemy healthbars

Another thing that you'll often see in games are healthbars for enemies that will appear over their heads, changing as the game is being played. In this recipe, we will learn how we can do what we've learned from the previous recipe and apply it here.

Getting ready

Before we start working on this, we need to have a project created and set up. Do the previous recipe all the way to completion.

How to do it…

Of course, to actually have enemy healthbars, we will need to actually have an enemy, so let's get that implemented first:

  1. Go to the Content Browser tab and then to the ThirdPersonBP/Blueprints folder. Right-click on the ThirdPersonCharacter object and then select Duplicate and name the duplicated object AI.
  2. Double-click

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