So using a health bar in a game and have it setup for the health bar set width to player instance health variable.
the health value is set to the same width of the health bar width.
What I am wanting to do in the game is allow the player to upgrade health to give them more health. How do I do this yet keep the health bar the same width?
So the width is 110 and the health value is 110, if player does the upgrade and say adds 20 health the health value changes to 120 but I need the health bar width to stay at 110