Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a 'Best Score' for individual players?
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
So I made a game which has a high score variable(not cloud data). But then I logged out and tried it, but the high score variable had the same value from when I tried it logged in. I have no experience with cloud data whatsoever.
You can help me by:
1. Posting the solution below.
2. Fixing the code and remixing it.Then send me the link.
Thanks!
P.S. Here is the link to my project.
You can help me by:
1. Posting the solution below.
2. Fixing the code and remixing it.Then send me the link.
Thanks!
P.S. Here is the link to my project.
Last edited by dancebouy (June 24, 2017 19:35:48)
- cs544305
-
13 posts
How to make a 'Best Score' for individual players?
I've done it before. Look at the top right corner of the stage. Examine the scripts. https://scratch.mit.edu/projects/162094289/
- BotanAI
-
100+ posts
How to make a 'Best Score' for individual players?
Forever:
If (score) > (highscore):
set (highscore) to (score)
If (score) > (highscore):
set (highscore) to (score)
- EpicCoder2002
-
100+ posts
How to make a 'Best Score' for individual players?
Making a project save individual scores is pretty complicated. You could use what @BotanAI said above, but it would be a global highscore that anyone could beat.
If you really, really want a specific highscore for each player, I could try to help you with it.
If you really, really want a specific highscore for each player, I could try to help you with it.
Last edited by EpicCoder2002 (June 24, 2017 22:32:39)
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
Forever:
If (score) > (highscore):
set (highscore) to (score)
This is what I did, but when I tried it offline, it had the previous score from when I tried it online.
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
Forever:
If (score) > (highscore):
set (highscore) to (score)
This is what I did, but when I tried it offline, it had the previous score from when I tried it online.
- EpicCoder2002
-
100+ posts
How to make a 'Best Score' for individual players?
That's how you make a global highscore, using cloud variables. It just simply doesn't work that way with regular variables. Whenever you reload the page, normal variables reset to the value they had when the project was last saved.Forever:
If (score) > (highscore):
set (highscore) to (score)
This is what I did, but when I tried it offline, it had the previous score from when I tried it online.
Last edited by EpicCoder2002 (June 25, 2017 16:36:25)
- BotanAI
-
100+ posts
How to make a 'Best Score' for individual players?
EpicCoder is right. All variables reset to their saved state upon reloading the project. It is impossible to save any data without the use of cloud variables except with a save-code, but those can easily be cheated with.
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
Making a project save individual scores is pretty complicated. You could use what @BotanAI said above, but it would be a global highscore that anyone could beat.
If you really, really want a specific highscore for each player, I could try to help you with it.
Most of you aren't getting that I want to make a score for INDIVIDUAL players. It's in the question but many suggested a global highscore. This guy (and some other people) got it though.
My project is currently running on a global highscore. This guy says that it's hard to make an individual player highscore. So, I might need some help with this.
On second thoughts though, I want a global and individual player highscore.
Can anyone give me tips to get started?
Thanks!
- asivi
-
1000+ posts
How to make a 'Best Score' for individual players?
You have the Scratch Wiki and lot of project tutorials to learn how. Just search for.
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
Making a project save individual scores is pretty complicated. You could use what @BotanAI said above, but it would be a global highscore that anyone could beat.
If you really, really want a specific highscore for each player, I could try to help you with it.
Most of you aren't getting that I want to make a score for INDIVIDUAL players. It's in the question but many suggested a global highscore. This guy (and some other people) got it though.
My project is currently running on a global highscore. This guy says that it's hard to make an individual player highscore. So, I might need some help with this.
On second thoughts though, I want a global and individual player highscore.
Can anyone give me tips to get started?
Thanks!
- EpicCoder2002
-
100+ posts
How to make a 'Best Score' for individual players?
Which way you choose to save the score depends on what else is in the project. Do you have other things you want to save, besides the score? Then make a save code the player can copy. Is the high score the only thing? Then you might want to try using cloud data.
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
Which way you choose to save the score depends on what else is in the project. Do you have other things you want to save, besides the score? Then make a save code the player can copy. Is the high score the only thing? Then you might want to try using cloud data.
Sorry, can you please tell me what a save code is?
Also, I have a global highscore and an individual player highscore. What should I do?
- EpicCoder2002
-
100+ posts
How to make a 'Best Score' for individual players?
By a save code, I just mean a variable that can be copied from the project, and be pasted into the project with theWhich way you choose to save the score depends on what else is in the project. Do you have other things you want to save, besides the score? Then make a save code the player can copy. Is the high score the only thing? Then you might want to try using cloud data.
Sorry, can you please tell me what a save code is?
Also, I have a global highscore and an individual player highscore. What should I do?
block.
I don't understand the second question.
Last edited by EpicCoder2002 (July 8, 2017 15:45:25)
- dancebouy
-
23 posts
How to make a 'Best Score' for individual players?
By a save code, I just mean a variable that can be copied from the project, and be pasted into the project with theWhich way you choose to save the score depends on what else is in the project. Do you have other things you want to save, besides the score? Then make a save code the player can copy. Is the high score the only thing? Then you might want to try using cloud data.
Sorry, can you please tell me what a save code is?
Also, I have a global highscore and an individual player highscore. What should I do?block.
I don't understand the second question.
Thanks for answering my first question. Can you give me an example of a save code please?
About that second question, someone told me that making the individual high score variable(s) would be hard, So I just need some help because I am not a professional coder.
- EpicCoder2002
-
100+ posts
How to make a 'Best Score' for individual players?
I can make an example project, it would be easier to explain. However I won't have access to my computer until Monday.
- dogdillonatschool
-
1 post
How to make a 'Best Score' for individual players?
I think he was a bit late from monday I can make an example project, it would be easier to explain. However I won't have access to my computer until Monday.
- Discussion Forums
- » Help with Scripts
-
» How to make a 'Best Score' for individual players?