Problem using MOD to turn on shield every 100 points

sparkzillasparkzilla Member Posts: 152
edited November -1 in Working with GS (Mac)
I want to add a shield to my actor after every 100 points. I thought I would be able to use the Mod function:

Shield Active = Game.Score%100
If ShieldActive = 0 then create Shield actor

But the problem is that the Game score does not go up in single digit increments - while some targets have 1 point some of my targets have 5 or 10 points, so the score sometimes does not fall on 100 exactly. It could jump from 98 to 108 without hitting 100 so the mod will not be 0 and the shield will not activate. Ideas most welcome!

Comments

  • magic101himagic101hi Member Posts: 713
    Use even increments, tis easier.

    -Josh
  • sparkzillasparkzilla Member Posts: 152
    How do even increments help?
  • sparkzillasparkzilla Member Posts: 152
    For now I decided to add larger incremental scores as smaller timed increments so an increase of 5 points would be

    After 0.1s
    Game Score +1
    After 0.2s
    Game score +1

    etc...
  • sparkzillasparkzilla Member Posts: 152
    Aha. And to think I watched that yesterday and completely forgot it today!

    Thanks TSB - It works perfectly!
Sign In or Register to comment.