can't save best score

nir3112nir3112 Member, PRO Posts: 312
im working here on my game and im finished, but yesterday its just not working!!
the problem is:
i made best score scene
and it work like this:
rule: when score > 1st; change 1st to score
but i need to save the score when the player lose so in this rule i made 1 more condition:
(when the first condition correct and ) when life = 0; change 1st to score.
but its not working because the life always up to 3 when he start playing again and then the best score removed and change again to 0.
in my game i dont have time or someting else that make the player lose, just the life.
how can i do it? how to fix this?? plz help!!(sorry for my English ^_^)

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    Sounds like your rule for changing lives to 3 again is firing before the save code.

    You could move the save code down below the change lives to 3 code in the layers.

    GS reads from the bottom up in the layers.

    Darren.
  • nir3112nir3112 Member, PRO Posts: 312
    ok i changed everything.. but there is another problem..
    the score go to 0 every time the player is starting a game so it changing the 1st to 0 too
    what can i do???
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited May 2013
    Have you got 2 game integers set up for currentScore and bestScore?

    When you lose all your lives you need to check if the current score is better than the best score and save it.

    Then if you have an actor for game over in there reset the score back to 0 and lives back to 3 when touch is pressed.

    Darren.
  • nir3112nir3112 Member, PRO Posts: 312
    Have you got 2 game integers set up for currentScore and bestScore?

    When you lose all your lives you need to check if the current score is better than the best score and save it.

    Then if you have an actor for game over in there reset the score back to 0 and lives back to 3 when touch is pressed.

    Darren.
    thx a lot i fix it i make "save attribute" in 'replay' and 'home' buttons..
    so it will save the best score first and load them to 1st and then reset score..
    thx a lot for helping me!!!!!!
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes remember code is fired in a linear order so how to place the code in an actor matters.
Sign In or Register to comment.