I make progress bars this way:
- progress bar itself is tiled background - it lets to avoid stretching texture when you change its size, instead it's "revealing" texture.
- progress bar has set starting point horizontally - left, vertically - center. So it will "grow" from left to right.
- I create two constant variables: one for max bar width (or length) and one for max value that you bar is representing. Ex: max_bar_width = 100, max_lifes = 10.
- then I calculate bar width:
set bar.width = floor(current_lifes/max_lifes * max_bar_width)
- you can show values for progress bar over it as text:
set text = current_lifes & "/" & max_lifes.