Modulus question
tswartz
Member Posts: 24
I'm trying to change an attribute +1 every 250 points. Obviously you'd do game.score%250 and then every time the score hits 250, 500, etc., the attribute gets +1.
My problem is that my scoring isn't always going to hit 250. The score might hit 255 or 260 without hitting 250 first, therefore the modulus rule isn't getting triggered. Is there any way to have the attribute +1 every time the score is equal or greater than 250, like described?
My problem is that my scoring isn't always going to hit 250. The score might hit 255 or 260 without hitting 250 first, therefore the modulus rule isn't getting triggered. Is there any way to have the attribute +1 every time the score is equal or greater than 250, like described?
Comments