Load saved score problem?
http_gamesalad
Member Posts: 1,340
Hello ! I've watched tshirts pooths video about "loading and saving scores" The problem comes when I load my score! When I load my score my score text (which shows how many points you have) it automatically changes the score to 43 which is my current high score. I'm working with custom fonts btw if that helps you guys. I want it to load the scores but I want my score text to say "0" every time the game opens up or reset the scene.
Thanks
Comments
booths *
You can edit your post up to 24 hours later by hovering your mouse over and clicking the little cog in the top right of your post.
Your post is vague so I am going to take a guess. When your game opens up have an actor off scene with a Change Attribute action in it and reset your score to Zero.
When you have a problem upload a test project or screenshots of the problem code with detailed explanation so the members have something to work with.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@colander sorry! but it worked!!!!!!! thanks so much!!!!
@colander wait I came into a little problem. Okay. When I "save" and "load" my game score and my highscore it doesn't display. It just says "0". I did the change attribute to 0 and it stopped changing the score to 45. But when I press the home button and then press play for some reason it just doesn't save any of my scores or loads them up. I'm using custom fonts.
Does this help you better? thanks
You have to pass your score to another attribute for high score and save and load it at the start too.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@colander For some reason when I save my high score it doesn't change my score back to "0" because I put a rule
Rule: When hscore is > 35
Do: spawn actors randomly
When you lose the game and you press the restart button it just starts spawning actors randomly but the score says "0"
I believe the problem is in my highscore save attribute
@colander I believe it's a problem between my save attributes and load at attributes. Because for some odd reason it doesn't load once I press the home button. But it saves during game play.
Here's a rule a I put:
If high score > score
Change attribute
Score to high score
I don't think the score is internally change back to "0" like what I want, I believe the only changes visually.
And also how would I save my score and high score properly? Which actor would you recommend putting my "save attributes" in?
I have attached a demo of one way to handle scoring using tables. Tables are a much better way of handling saving and loading. It will give you the basics and you should be able to create a system to suit your game score structure.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
@colander thanks bro I'll take a look at it right now!
@colander I've never used tables before. So how would I come around this? Could you give me any tips?
Tables are very easy to use and there are a lot of tutorial videos about them. Have a look at @The_Gamesalad_Guru videos at There is a video on tables there and a lot more tutorials on many topics.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template