How do i implement a "ingury" system and show it on a single progress bar

Hi everyone im wondering how to make a ingury system I’ll give an example

Variables
Max hp 100
Current hp100
Damage taken20
Ingury damage10

OK so lets say character has 100 hp takes 20 damage but take 10 ingury damage and heals but only gets to 90 and has
10 hp gone until said character gets aid

So the question is how can I implement this on a single progress bar with one variable going left to right and the other in reverse

As a reference the idea is like final fantasy 13 2 health bar as they take damage hey lose max hp but without losing it permanently

Hello, could you upload an example screenshot or a crude drawing?

You will be able to easily replicate this functionality with 2 plain progress bars, one on top of another. Both have backgroud opacity set to 0:

The injury bar is not really moving in the other direction, it’s just filled more than the bar on top, it seems.

You could skip the progress bar idea altogether and use slot’s FillSize for this but that would unnecessarily complicate things.

The injury bar stores the amount of health you can regenerate, so you can use that value as max health when regenerating recent injuries.

For example, you get hit for 40 damage but can regenerate 30 health back, 10 dmg will remain permanently.
You set HealthBar to .6 and the InjuryBar to .9.

Here’s a reference video

Upper health bar on the bottom right hand of screen that’s what I’m going for.

Thanks for any and all help

I’ll definitely try this out thanks
Can you put step by step instructions for future people who want this type of system as a reference

Ok I’m having some trouble wih coding this can you show the blueprint for the bars I’ve coded 1 bar but I’m having trouble with this please help thanks

Never mind I think I got it

There’s no code here, just widgets sitting in the hierarchy.

Nope I don’t lol can you help me make his properly coded

Here’s the widget:

The code inside the widget that crunches the numbers:

And how it’s triggered:

And the final look:

You will, of course, need to work in additional details. Like health limits, animating the numeric health amount, chaning the colours and so one. All can be done in a very similar fashion.

Hope it gets you started.

Cheers.

Thanks for the script I’ll try this out thanks for all the help