High Scores

iWiniWin Member Posts: 334
edited November -1 in Working with GS (Mac)
does anyone have any tutorials or templates on how to make a top 5 or top 10 high scores chart...
I could really use one in my game...THANKS

Comments

  • iWiniWin Member Posts: 334
    Eny1 with an idea??
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    There is a save fuction. You can save your actual score and then show them all somehow.

    I don't know how to do that, because I am not so far in my development, but I will need it too and I will try to figure out.
  • iWiniWin Member Posts: 334
    okay,...iM trying too...There was a template for top 10 high scores but i cant find it anymore....
  • JGary321JGary321 Member Posts: 1,246
    Hey Buddy, something like this....

    At the end of each round do a check like this.

    If game.High Score 1 < game.Current Score
    Change game.High Score 1 to game.Current Score

    *Else
    *If game.High Score 2 < game.Current Score
    *Change game.High Score 2 to game.Current Score

    **Else
    **If game.High Score 3 < game.Current Score
    **Change game.High Score 3 to game.Current Score

    ***Else
    ***If game.High Score 4 < game.Current Score
    ***Change game.High Score 4 to game.Current Score

    Etc...

    So High Score 2 is nested in the else of High Score 1. High Score 3 is nested in the else of High Score 2. High Score 4 is nested in Else of High Score 3....

    Understand?
  • iWiniWin Member Posts: 334
    Yeah...makes scense...thanks
  • ejsgameejsgame Member Posts: 161
    how to make high score 1 drop down to high score 2,and high score 2 drop to high score 3 when current score is highest?
  • JGary321JGary321 Member Posts: 1,246
    At the end of each round do a check like this.

    If game.High Score 1 < game.Current Score
    Change game.High Score 3 to game.High Score 2
    Change game.High Score 2 to game.High Score 1
    Change game.High Score 1 to game.Current Score

    If they don't trigger in order for you, just wrap each in a timer like this:

    If game.High Score 1 < game.Current Score
    After: ".1"
    Change game.High Score 3 to game.High Score 2
    After: ".2"
    Change game.High Score 2 to game.High Score 1
    After: ".3"
    Change game.High Score 1 to game.Current Score

    Got it?
  • ejsgameejsgame Member Posts: 161
    it works after put in the timer!thanks alot!
  • ejsgameejsgame Member Posts: 161
    i tried to build a standalone app n test it on my itouch...why everytime i restart the game,the high score change back to 0?
  • JGary321JGary321 Member Posts: 1,246
    You have to save the high score & then load them.

    use the save attribute to save.. like this

    save attribute
    KEY" HighScore 1 game.attribute highscore1

    then load them as well that way
  • ejsgameejsgame Member Posts: 161
    thanks JGary321!found out my mistake which is my 'high score' scene is after 'game over' scene...now change it to front and working d...thanks for replying
Sign In or Register to comment.