A widget is created for any attribute that requires a visual progress bar on the HUD. So, for example, by default, my display shows health and stamina.

Adding a New Attribute Progress Bar

To add a new attribute progress bar for a specific attribute, you must add it to your HUD by searching for WBP_AttributeProgressBar in the panel.

1280X1280.PNG

Drag a property bar onto the canvas panel and give it a name (choose a name that describes the properties this progress bar belongs to).

1280X1280-1.PNG

Once you've done that, you can click on the property bar and specify a few things. Things like its appearance, whether it has a lerp bar (a secondary bar that shows the consumption of a property), and even which property this property bar is for. You must specify the property you want the property bar to belong to in order for the progress bar to update.

1280X1280.PNG

You can see all of these options in the Details panel after selecting the attribute progress bar you just added.

For this example, I've selected the Attribute Tag as the AttributeSystem.Base.Health attribute. Therefore, whenever the value associated with AttributeSystem.Base.Health changes, this attribute progress bar will automatically update. If the "UpdateLerpAttributeBar" Boolean is set to true, the lerp bar will also automatically update.

This will work for any attribute in the system and will automatically update, so it will work for health, mana, stamina, or any attribute you want to update. However, if you've added a custom attribute, make sure you set it up correctly.

Important: You need to manually call InitializeStatBar in the Event Construct to initialize this WBP_AttributeProgressBar for it to work.

1280X1280-1.PNG

Updating Attribute Bar Width

If you want the stat bar width to update to the maximum value of the attribute, you can do so. This allows the player to appear stronger as they level up. For the stat bar to update to the maximum value, the "MaxAttributeUpdateWidth" Boolean value must be set to true.

However, note that the MaxWidthOverride property will limit the maximum width of the stat bar, as an infinite width would exceed the screen.

If you don't want the stat bar width to update to the maximum value, set the "MaxAttributeUpdateWidth" Boolean value to false, then control the size of the CustomWidthOverride to fix the stat bar width.

If you want to vary the size of the stat bar (e.g., you want 100 stamina to appear smaller than 100 health), you can do so by specifying "AttributeBarSizeMultiplier".