GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

High Scores

iWiniWin Posts: 334Member
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 Posts: 334Member
    Eny1 with an idea??
  • HunnenkoenigHunnenkoenig Posts: 1,173Member
    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 Posts: 334Member
    okay,...iM trying too...There was a template for top 10 high scores but i cant find it anymore....
  • JGary321JGary321 Posts: 1,246Member
    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 Posts: 334Member
    Yeah...makes scense...thanks
  • ejsgameejsgame Posts: 161Member
    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 Posts: 1,246Member
    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 Posts: 161Member
    it works after put in the timer!thanks alot!
  • ejsgameejsgame Posts: 161Member
    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 Posts: 1,246Member
    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 Posts: 161Member
    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
This discussion has been closed.