Sorry if this question was asked already, but I haven't found one that answered this.
How do you make a health bar (horizontal or vertical) decrease in length from max length to 0? I'm trying to make a platformer game of some sort, and it requires a health bars for the player and enemies. Every time I make a health bar lose value (or "health"), it loses its length on BOTH sides of the bar, meaning it looks odd when the entity it is for loses health. I want ONLY the top (for vertical) or the left (for horizontal) side of the bar to shorten until the bar depletes. Plus, it should work for bars that have different colors for design, or bars that have outlines without making them look stretched. I've been stuck at this for a while now, and I can't figure out how to solve this.
Thanks in advance!