Problem with High Score

Hi guys,i have a problem with the score system.
I explain better
I watched this tutorial


When i restart my game in the title menu there is the high score (ok),but at the beginning of the game(level 1) the score ,(that should be 0), is the high score,(and the game start counting the points of the new game from the high score).
Any suggests?
Thank in advance

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Without seeing your rules, there is no way we can know what is happening.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Ronaldinho10Ronaldinho10 Member Posts: 26
    Ops is true:)
    1. in the first scene i load the high score attribuite ( works fine because there is the previous high score)
    2 in level 1 i use display text. Game.score (here is the problem ,the score is the previous high score and not 0)
    3 when the game ends (last scene) in a timer i set : if Game.score is > than game.highscore
    Change attribute game.highscore to game.score and save highscore attribute

    Thank
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Although you say the first scene works fine, it's likely the problem is there. If you can post a screenshot of ALL of your rules that involve saving and loading scores, I can help you.

    To post a screenshot, upload the file to a hosting service such as ImageShack and then paste the URL as follows:

    image

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Ronaldinho10Ronaldinho10 Member Posts: 26
    edited November 2012
    thank,
    Here are the screen shots

    Actor in the gameover scene

    Image Hosted by ImageShack.us


    Level 1

    Image Hosted by ImageShack.us


    start menu

    Image Hosted by ImageShack.us


    intro

    Image Hosted by ImageShack.us


  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Those rules look fine so I'm not really sure why it's not working for you. If you'd like to send me your project file (zipped), I can take a look.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The problem is not with saving attributes, the problem is that you never reset game.score to 0 after the player wins/loses. If you add a Change Attribute behavior to your Restart? actor, it will fix it:

    image

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Ronaldinho10Ronaldinho10 Member Posts: 26
    Thanks a lot
    Now it works!
Sign In or Register to comment.