Two Highscores getting mixed up

Hello guys I am making a game that involves two different highscores from two different game modes. I have an actor in each of the game mode scenes called Save_score for the first and Save_score2. I have a rule as to when the score is > highscore then change the highscore to the score and save it to key "a". Same thing for the second game mode except theyre separate attributes and the second highscore gets saved to key "b". in the loading scene i have it where both attributes are loaded with the matching keys. after 3 seconds the scene transitions to the main menu where both of the highscores are displayed. After I am finished with the game and close out of the app and reopen it the game compares the two highscores and displays the bigger one on both of them. I tried redoing the code and making sure I never mixed up the two attributes and i still cannot figure out what the problem is exactly. Please help I have been stuck working on this for the past 3 days.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You have to understand that explaining how you have rules set up is only partially helpful. Some aspect of what you've done is incorrect. I know from personal experience it can be maddening, especially when you have double- and triple-checked your rules. But there's a "run to completion" checked when it shouldn't be or a missing parenthesis or a behavior inside a rule when it should be outside of any rules, etc.

    You can either upload screenshots or a bare bones project file to a file-sharing site such as Dropbox and then post the download link here.

    Or you can just make your life easier and use a table. The Save Table behavior will replace all of your Load Attribute and Save Attribute behaviors.

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

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2016

    Also adding to what tatiang has said, it's not entirely clear what the question actually is, I read through the post a few times and still couldn't work out what issue you are trying to resolve ?

  • NNterprisesNNterprises Member, PRO Posts: 387

    I agree that it is unclear... maybe separate some things and not have it all in one paragraph.

    But first off if I understand anything, I would save your high scores in tables. Where (1,1) is your A and (2,1) is your B.
    Do what you said, change table value to score if it is higher than the high score
    Save table

    When app opens up:
    If numeric expression (tablevalueA) > (tab..B) display A
    Else Display B

  • peterraadpeterraad Member Posts: 56

    Yea you guys are right. I decided to use tables instead and it worked out perfectly lol

Sign In or Register to comment.