I want to learn something about percentages.
Here’s my question: I’m trying to code some “health regeneration” system. In some decisions, your character will take damage and loose some of his/her health. In percentages, player’s maximum health will be %100. But there is a problem that I couldn’t solve. In regeneration system, if you are not wounded, your health will regenerate in time. I control this regeneration values. Like, in every choice, you will regenerate a portion of your health but, if I add health to player like “*set health +10” it can pass over 100 (I mean, max health is 100; but with this idea, the health can be 200 or bigger). How can I code this maximum health system?