i have a experience bar that every time i level up my max health and level number increase along with experience needed for the next level but since the progress bar only goes from 0-1 (0 to 100) how am suppose to make it go above 100 and show the number correspond with health.Right now health is at 100 but the bar is empty? .i will post pics of the code and pics of in game.
Are you asking how to compute the new health ratio after MaxHealth increases?
I did something similar. I will give you a screenshot of how i did it once i get on my pc. Its pretty easy.
Here how i think you can do it. I forgot how i actually did it.
But just increase the max health. Then divide current health by max health. Pass this value as the progress bar value.
So for example if you have 50 health it will be something like this: 50 ÷ maxhealth. So if maxhealth = 100 then 50 ÷ 100 = 0.5. MaxHealth = 200. 50 ÷ 200 = 0.25
This is for showing the progress at the bar only. Its upto you if you want the default value to be 100 and then divide the value to make it 1. Or just keep the 1 and multiply later if you want to show the health in number form
ok i will try that but how do i set current health equal to max health when i level up
nvm i figured it out