Getting Started
Creating A New Widget With Catchup Functionality
See W_ExampleHealthbar for an example implementation.
Create a new
User Widgetclass (User Interface → Widget Blueprint).Select
W_CatchupHealthbarBaseas the parent class for the widget.
Add an
Overlaywidget.Add two
Progress Barwidgets to the overlay. One will be the main progress bar, and the other will be the catchup progress bar.
Select the main progress bar and ensure
Background Imageis set to draw as None.
Bind the percent for the main progress bar to
Main Percent.
Bind the percent for the catchup progress bar to
Catchup Percent.
Ensure the catchup progress bar has a different fill color than the main progress bar so they can be distinguished from each other.

Adding Catchup Functionality To An Existing Widget
Open your widget and click Class Settings.
Change
Parent ClasstoW_CatchupHealthbarBase.
Bind the percent for the main progress bar to
Main Percent.
Bind the percent for the catchup progress bar to
Catchup Percent.
Adding A Healthbar To An Actor
See BP_NPC and W_ExampleHealthbar for an example implementation.
Add a
Widget Componentto your actor.Set
SpacetoScreen, setWidget Classto your healthbar widget class, and setDraw At Desired Sizetotrue.
In the
BeginPlayevent, callInitialize Values. Make sure to setConsumer Will Manually Update?totrue, because screen space widgets don’t always receive tick events (e.g. when they’re offscreen) which can lead to odd behavior.
In the
Tickevent, callManual Tick. This way, we can be sure the widget always receives tick events.
In the
AnyDamageevent (or whenever the current health changes), callSet Current Value.
Adding A Healthbar To The Screen
See BP_Player and W_ExampleHUD for an example implementation.
Create a new widget or edit an existing one.
Add a healthbar widget to your widget.
If you’re using
W_ExampleHealthbarfor this step, setHide Healthbar When Fulltofalseso the healthbar is always shown on the screen.Set
Is Variableto true so the healthbar widget is accessible to Blueprints.
In your player blueprint, create your widget and add it to the viewport.

In the
BeginPlayevent, callInitialize Values. We can leaveConsumer Will Manually Update?unchecked because the widget will always receive tick events when added to the viewport.
In the
AnyDamageevent (or whenever the current health changes), callSet Current Value.