I threw together this:
So in this example the idea is:
- When the HUD widget is created, create the max number of hearts that there can be, add them to the container (in this case a horizontal box) and hide them.
- When the player health changes:
2A: loop through the currently displayed hearts and hide them
2B: get the players current health, floor it to get number of whole hearts and using a loop with that number, set that many as visible.
2C: Get the remainder of the player health, get the heart widget and somehow tell it to update to account for the remainder.
2D: update how many hearts the widget is displaying.
The only thing I am not sure how to do is displaying part of the heart. There are many ways to display it, like -
- Display it partially, lerping the texture from top to bottom?
- Have it like a pie/clock thing, whatever that is called?
- Like in newest zelda where each heart consists of a number of pieces?
And I’m not sure how to only show part of a texture.
And etc.
The blueprint setup above can of course be optimized and adjusted in various ways. I notice now, you may want to start the loops at index 0. Don’t take the blueprints too litteral, it’s more of an example.


