Saving numerous level scores.

EIGHTHSINEIGHTHSIN Member Posts: 132
edited November -1 in Working with GS (Mac)
Hi Guys,

I am working on a game where I would like to save every level score and display them within the level select menu on the icon used to launch the levels. I have followed the tutorials, and have successfully been able to do so, however I am trying to use a method that wouldn't require numerous attributes since information needs to load within an attribute (if I am trying to save the scores for every level I would need an attribute for each of them...Tedious!!!)

I had an idea but for some reason it doesn't work, if someone can spot what I am doing wrong it would be much appreciated and help all the others who are having the same problem,

I have two game attributes, Local Score and Score

Within the level select actor I have a self attribute self.score and a rule stating if touch is pressed change attribute game.score to self.score, which initially is zero.

I then play the game to generate a score, which is saved within the game.Local score attribute. Once the game is finished I have a rule stating if game.Local score > game.score
save game.Local Score with key score1.

I then created a load within the level select actor, which loads score1 into the self attribute self.score together with a display text self.score.

This should not only save the score but also pick up on new high scores, without the need of any more attributes but it doesn't...any ideas???

Cheers,

EI8HTHSIN

Comments

  • EIGHTHSINEIGHTHSIN Member Posts: 132
    I can confirm the above method works!!! Forgot the case sensitivity on the key...ROOKIE!!!
    lol...

    Enjoy!

    EI8HTHSIN.
Sign In or Register to comment.