YES!
I just got done working on something myself. Personally, I prefer to use a billboard, but the same logic applies. We’re still working with the Y scale. Scale the bar however you feel - In my example, I’ve used 96. Keep that number in mind.
You’ll also need to declare some basic variables.
- Healthbarfullscale - Basically getting the default “96”
- HP Increment - the value we’re feeding into our billboards Y axis to scale it.
You need 3 Materials.
- OK Health
- Medium Health
- Bad Health

On begin - You’re going to want to reference that Y scales initial value.
While I’m testing, I find it’s useful to print strings as visual feedback to make sure I’m pulling the right value through.
Then, on take damage - add a sequence. Damage mechanics go in first. Then, you rescale your bar.
This works by getting your current monster HP as a percentage of the full HP, and scaling the Y axis by that factor. The value returned is fed back into the element. So at 67% health, your bar will be 67% of that initial “96” that you got.
Once you’ve scaled, the third step is to see if we need to give visual feedback about the condition. Basically I can split 96 into 3 segments. 0-32, 33-64 and 65 to 96 - nice 32/32/32 chunks.
I check first if I’ve gone below 65. If I have, I then check if I’m below 33. If I’m not below 33, I go yellow, if I am, I go red. If I’m still over 65, then I do nothing, and stay at my default.
Once we’ve built this, let’s look back.
Key things -
I always set the scale before the colour. You’ll notice the scale element draws the same material on “make” that it pulled from “break” - essentially - “I will always use whatever colour my bar is set to, until I need to change it”.
My Float/50 - My initial monster HP is 50 in this example. Current HP/50 returns a factor of 1. This is the easiest way to scale, as you can then just use this as a multiplier.
This bar scales inward from both ends.
You can apply the same logic as the original answer to mitigate if you want. Kick it along the Y axis transform by using a product of your multiplier, and the current bar Y scale to come up with a value to feed into the transform.
Easy Peasy.