[SOLVED] Color-changing bar
Posted: Sun Apr 11, 2021 3:02 pm
I have a health bar
I want the bar to change color according to how healthy you are. For instance, if you are at full health the bar is green. If you are at half your health the bar is yellow. If you are severely injured, almost dead, the bar should be red
I've created several images for the bars, but I have no idea how to tell the program which one to use
Basically:
except left.png should be whichever bar is appropriate
Thank you
I want the bar to change color according to how healthy you are. For instance, if you are at full health the bar is green. If you are at half your health the bar is yellow. If you are severely injured, almost dead, the bar should be red
I've created several images for the bars, but I have no idea how to tell the program which one to use
Basically:
Code: Select all
style bar:
ysize gui.bar_size
left_bar Frame("gui/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
right_bar Frame("gui/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
Thank you