2D Health system c++

Hey, i want to make a simple health system in c++ for a 2D game. How could do this?

Here’s a tutorial.

It will work for a 2D game as well as it’s just drawing to the screen via UMG.

Thank you.