Save score bug?

ktfrightktfright Member Posts: 964
edited November -1 in Working with GS (Mac)
I'm really close to submitting my game Shoot Shoota, but when i try to save the highest score when a user beats their previous score, it is not the same number that was supposed to be saved, it is a lower number. is it me, or is there a bug in the system?.

I'm still racking my head as to why it is doing that. any tips?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    i haven't noticed a bug yet... and i'm loading in and saving 180 or so Attributes...

    What is your high score logic?
  • ktfrightktfright Member Posts: 964
    Saving:
    Score > Bestscore,

    Change attribute Bestscore to Score

    Loading:
    load keyword 'score' to best score attribute

    play my game shoot shoota, and you could see what i mean. when i die and its game over, i have another actor that displays the score, but when i go to the menu to see my best score, the numbers are not correct at all.
  • butterbeanbutterbean Member Posts: 4,315
    Kt, I had the same problem, try using "constrain" attribute instead of "Change attribute" and it should fix the problem :)

    So if score > high score

    Constrain High score to score
  • stanimationstanimation Member Posts: 406
    @FMB. Is the logic Kt is using the same you use?
  • ktfrightktfright Member Posts: 964
    cool, ill try that!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Yes, I think so.

    Just to be clear:

    game.currentScore
    game.bestScore

    When Game is Over
    When game.currentScore > game.bestScore
    Change Attribute game.bestScore To: game.currentScore
    Save Attribute: game.bestScore Key: BESTSCORE

    When loading
    Load Attribute game.bestScore key: BESTSCORE
    Load Attribute game.currentScore key: CURRENTSCORE

    If you are constantly showing the high score during game play or on a menu that you can go to during game play, you would use Constrain Attribute like butterbean said.
Sign In or Register to comment.