How can I do a proper health bar?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ZeBirosca
:warning: Old Version Published before Godot 3 was released.

I’m trying to do a health bar for my game like I did in unity:
A red bar sprite inside a health bar sprite, that changes his width according to the health points.

Health Bar
Red Bar

The problem is that I can’t change my sprite size without without resizing it. So this is what happens:

Gif

Changing the pivot don’t help.

So my question is: there’s a way to make it works on Godot, or there’s betters ways to do proper health bars?
I didn’t use progress bars because I want to use custom sprites to represent the red bar (the gifs are only programmer art).

:bust_in_silhouette: Reply From: YeOldeDM

There is the TextureProgress node which lets you load custom textures (as well as do cool things like radial bars!). You can also apply your custom textures to a regular ProgressBar by applying Styles to it.

Oh, I didn’t know of that node neither the style thing… my bad.

thank you.

ZeBirosca | 2017-08-08 02:34