janszmatt

I wanna make a level system for my browser-based game using only variables and calculations(*,/,+,-).

Variables:

$skillpoints

$divide

Ok here the level system

Level 1 needs 0 skill points

Level 2 needs 100 skill points

Level 3 needs 300 skill points

Level 4 needs 600 skill points

the skill points have to be divided by a variable $divide to get the level eg:

eg:

Level2 = 100/50

Level3 = 300/100

Level4 = 600/150

level X = $skillpoints/$variable

so how do i set the $divide variable to +50 every level

and how do i remove (not round up) the decimals after the division?

If there's another way witout using variables and calculations, i'm willing to hear but if it is possible, i would like to use variable coz it's simple...

Variables:

$skillpoints

$divide

Ok here the level system

Level 1 needs 0 skill points

Level 2 needs 100 skill points

Level 3 needs 300 skill points

Level 4 needs 600 skill points

the skill points have to be divided by a variable $divide to get the level eg:

eg:

Level2 = 100/50

Level3 = 300/100

Level4 = 600/150

level X = $skillpoints/$variable

so how do i set the $divide variable to +50 every level

and how do i remove (not round up) the decimals after the division?

If there's another way witout using variables and calculations, i'm willing to hear but if it is possible, i would like to use variable coz it's simple...