High Score help please

TheodiTheodi Member Posts: 96
edited November -1 in Working with GS (Mac)
Hi everyone, I need some advice on how to set up a few things,

I have 2 scores going in my game, one to record height like in papyjump, and one to record points from things collected along the way.

There are 2 levels.

So you start at level 1, play it, collect a few things. Then you go to level 2, and the same again, and after level 2 it displays the High Score Screen.

Im confident Iv got it remembering all the scores then displaying them on the high score screen, but something annoying happenes,

When the player clicks the button to reset the game and start again back at the Start Screen, and clicks Play, the first level height score is displayed, it is remembering it again, even though it is supposed to be resetting the whole game, can anyone advise me on this how to get around it?

Comments

  • PeeCeePeeCee Member Posts: 107
    Hi theodi.

    if i understand correctly, all you need to do is simply reset the score attribute to Zero "0" again using change attribute from the button/actor thats starts/restarts your app.

    if im missing something or misunderstood your above info perhaps advise what some code you have looks like

    cheers
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    open your reset button

    Create new rule
    When touch is pressed

    Change attribute game.score1 = 0
    Change attribute Game.score2 = 0
  • TheodiTheodi Member Posts: 96
    I tried that already, but not on the actual button. I'll try it on that now.
  • TheodiTheodi Member Posts: 96
    Well that didn't work for me. I put

    On actor pressed

    change attritube game.mainscore to 0

    and

    change attribute game.spaceheight to 0

    and a reset game afterwards.

    it doesn't work though.
  • TheodiTheodi Member Posts: 96
    I just put it in its own rule as well, but that didn't work either.

    I forgot to mention I have a save attribute in my score system, I dont think this would affect why this isnt working but thought Id mention it.

    Any ideas anyone?
  • TheodiTheodi Member Posts: 96
    Ok I figured it out, it was actually the save attribute which I thought I needed for it to display on the high score screen, but apparently not.

    Thanks for your help guys.
Sign In or Register to comment.