Samarium
Sure,
Let's assume I have 1lvl and 50 exp is threshold for next level
lvl: 1, exp: 0, expForNextLevel: 50
progress bar filled with: 0/50 = 0%
0% width in CSS styles
lvl 2, exp: 50, expForNextLevel: 100
progress bar filled with: 50/100 = 50%
50% width in CSS styles
lvl 3, exp: 100, expForNextLevel: 150
progress bar filled with: 100/150 = 66.67%
66.67% width in CSS styles
Is it possible with these two variables (exp, expForNextlevel)
to draw a progress bar filled with 0% on every level up?
I can't figure it out, so I am thinking about a third variable like: expGainedFromLastLevelUp