Need help with save/load attribute

BrynjeBamsenBrynjeBamsen Member Posts: 188
edited November -1 in Working with GS (Mac)
Ive made an adhoc build to test my save/load attribute - But it fails to load my saved highscore

here's what ive done.

If game.score is > game.highscore
Change attribute game.highscore to game.score

If game.score is > game.highscore
Save attribute
attribute game.highscore to key 1

I have an actor on the first loading scene
Timer after 0 sec

Load attribute
Key 1 attribute game.highscore

But it wont load the highscore after rebooting the game.

any thoughts?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Have a rule when attribute score is > highscore
    -change high score to score
    --save attribute highscore key 1

    Then in the first scene in your game have a load attribute behavior by itself, not in a timer. And load attribute highscore key 1
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    thanks john... that worked perfectly!
    Didn't no about the timer thingy.

    congrats on the sous chef. well deserved :)
Sign In or Register to comment.