Modulus question

tswartztswartz Member Posts: 24
edited November -1 in Working with GS (Mac)
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?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Yep, just click where the equal sign is in the middle of the rule and itll pop up a drop down and you can change it to equal or greater then. Then just have it when its >or= to 250 +1 then when its > or = 500 + 1 and so on.
  • tswartztswartz Member Posts: 24
    Trying to get around making rules for every "x" value though, since I don't want to necessarily hardcode limits in. Not sure how long a player might play the game for, so I'd either hardcode too many or too little.
  • tswartztswartz Member Posts: 24
    Thanks TSB. That's approximately what my workaround has been so far, but I wanted to avoid the timer/extra rules if possible by using modulus. Probably isn't possible though.
Sign In or Register to comment.