I’ve done some healthbar and I stood face to face with a big problem. Like We all know progressbar have precentage value from 0 to 1, it works only with constant values, We’re simply dividing the value through 100 and it works good… but what If I want to change the values? for example:
My character have a 100 HP. If my character is promoted to the next level, my life will increase about 5, and if add skillpoint to endurance takes additional 5 health… but then script of progressbar must be change because it will not fit… but how can I script that??
approach. 2 attributes basically.
And you’re gonna set the progress bar’s value to:
Health / HealthMax.
Whenever you level up, you’ll increase HealthMax. If you want (most games do), you can also increase current Health too (Health = HealthMax). There will be times where you want to increase HealthMax and not increase Health.
I have two variables - current health and max health. I need to create a one more variable health which is equal to the max health? but where I must to set up current health?