Progress bar in a progress bar - Material for health bar

Hello

I’m trying to create a health bar that has a separate bar inside it, sort of. In my game there are two types of damage: Normal and scratch damage - were the first just removes health, but the second is some the player accrues. I want the health bar to not only show how much health is left, but also how much scratch damage the player has, like so:

health bar.png&stc=1

Since such functionality seems beyond the progress bar widget. I’m trying to do it using a material, but I’m truly out of my depth. Anyone that can point me to a good tutorial, or have done something similar?

Awsome! Thanks a lot! I will take a look :smiley:

A follow-up question. The material works fine, but I have a problem applying it to the HUD bar.
I create a material instance dynamic and apply the difference between health/max health as a parameter value.
In the widget editor I have an Image with a binding wherein I try to create “brush from material” - but no matter what I do, the bar remains white.

&stc=1

Couldn’t you just use an extra progress bar layered over top the first one?

That do sound infinitely easier. Thanks, Godling! For some reason, my brain was stuck on expanding the yellow bar from the end of the red bar towards the base. Don’t know why.