Mimicking Overwatch health bar system

I know for a fact that the PreConstruct event is buggy and does not always update widgets correctly -
you can force it by clicking Auto-Fill buttons of the specific elements. Anyway, I never tested it during run-time. Having done that now, I can see it does not update correctly, indeed.

I made adjustments to the blueprint:

Handled the 0 division, ensured that the fill struct is pushed in correctly into the slate child slot, added a couple of events so the functionality is easily reusable.


Also added a SetHAS CustomEvent you can use for setting (and resetting) the initial values dynamically:

And a button that triggers it, now it updates fine in game, too:

https://gyazo.com/02a098513424d30025ef15cad267a0db

1 Like