Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How can I save stuff so when stop is pressed it is saved onto the next re-run??
- bookworm7214
- Scratcher
100+ posts
How can I save stuff so when stop is pressed it is saved onto the next re-run??
I'd like to be able to save high scores, etc, for the next re-run of my project. Is this possible and how would I go about doing it??
Sorry, not a very catchy title.
Sorry, not a very catchy title.
Original text:Please welcome my sister, gingerninja97, to the Scratch website!
“Scratch is an educational programming language aimed at children. It was developed in MIT, America.”
..35 translations later, Bing gives us:
“Australia Institute created the children's education, it doesn't matter.”
The above translation is courtesy of Akuna Bad Translator.
< You (or more correctly, lesser known Scratchers) won't be unknown anymore.
- drmcw
- Scratcher
1000+ posts
How can I save stuff so when stop is pressed it is saved onto the next re-run??
That's what cloud variables are for. If you create a variable called high score say and tick the cloud variable check box then you can have in your code;
if <(score) > (high score)> thenas high score is a cloud variable it will be saved to the scratch servers and be re-loaded next time.
set [high score v] to (score)
end
Last edited by drmcw (Oct. 22, 2013 17:36:48)
- cookiesandmore
- Scratcher
66 posts
How can I save stuff so when stop is pressed it is saved onto the next re-run??
that should work That's what cloud variables are for. If you create a variable called high score say and tick the cloud variable check box then you can have in your code;if <(score) > (high score)> thenas high score is a cloud variable it will be saved to the scratch servers and be re-loaded next time.
set [high score v] to (score)
end
- andre_rifaut_tests
- Scratcher
90 posts
How can I save stuff so when stop is pressed it is saved onto the next re-run??
For best “presentation” you should update the best score at the end of the each game.
For instance in a shooting project, you could add the aforementioned block in a forever block.
But in this case, the best score will be repeatedly updated DURING a (better) game and not at the end of each game.
For instance in a shooting project, you could add the aforementioned block in a forever block.
But in this case, the best score will be repeatedly updated DURING a (better) game and not at the end of each game.
- bookworm7214
- Scratcher
100+ posts
How can I save stuff so when stop is pressed it is saved onto the next re-run??
Thanks guys!!!!
Original text:Please welcome my sister, gingerninja97, to the Scratch website!
“Scratch is an educational programming language aimed at children. It was developed in MIT, America.”
..35 translations later, Bing gives us:
“Australia Institute created the children's education, it doesn't matter.”
The above translation is courtesy of Akuna Bad Translator.
< You (or more correctly, lesser known Scratchers) won't be unknown anymore.
- Discussion Forums
- » Help with Scripts
- » How can I save stuff so when stop is pressed it is saved onto the next re-run??