Just a quick question about High Scores
FlyboyTrevy_
Member, PRO Posts: 148
So in my scene, if the player's score exceeds the high score, it sets the high score as the score. Pretty basic. Then it saves the highscore attribute as A. Then when the game boots on the main menu, it loads that A attribute. When you jump in the game the high score that last achieved is displayed. This is constant even when exiting the testing program and going back out to the editor. When you return the menu still displays my last high score, and still displays it within the game.
So just a question, how do I reset that A attribute so that it returns to zero, so that when I publish the game everyones score wont be that. Or does it automatically just work that way...
Comments
It should NOT show the saved value after you exit the preview and go back in. Any chance you can post a link to download your project file (.zip it first)? I'm curious how you have it set up.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I just have like I said a game level attribute integer, default at zero, that when the score exceeds it it sets that to the high score, and saves the attribute to A. The main menu scene that the program starts on, has an actor that loads that attribute
from: A load: game.High Score
And displays it as text on the main menu, then when you jump in the scene I have an actor in the scene that also displays the High Score text...
Here's a video from the attached file of what should happen when you use Load & Save Attribute behaviors but exit out of the Preview and return (on a Mac, not on a mobile device). When you change scenes or reset the scene, it will retain the saved value. But once you exit (e.g. go Back), it won't.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Ok this is something I should have previously tested, but I exited Game Salad entirely, and its back at zero on the main menu. If that changes anything. It still keeps it around though when I leave game salad opened.
Im on windows by the way if that changes anything.
Hmm, I don't think the Windows version treats loading and saving attributes differently but I could be wrong about that. You posted in the Mac subforum so I'll go ahead and move this to the PC subforum.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User