Also when my character fights monsters, I want them to be able to attack and also get hurt (resulting in lower health), however when they use potions, I want their health to go up but not go beyond their max health (which is different in different levels).
Make an instance variable for your character called Health and one called MaxHealth
Then, when they use a potion, there's a nifty thing you can use called clamp. It makes sure a number doesn't go lower or higher than a certain lower and upper bound you set.
So when your character uses a potion, do something like
set character.health to clamp(character.health + potion.healamount, 0, character.MaxHealth)
The 1st number is the number you want to clamp. So it's the character's health plus the potion's health-restoring-amount. The second number is the lower bound. This is so that your character will never have below 0 health from taking a potion. The third number is the upper bound. This is your character's MaxHealth variable. The character's health + potion restoring amount will be capped off at whatever number is stored in character.MaxHealth So even if the MaxHealth changes in different levels, it will always be accounted for
Hope this helps :)