Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I add world record to my game?
- Picoguy
-
Scratcher
100+ posts
How do I add world record to my game?
In my game I want to add a speed run world record timer. How do I make it so that when you get a time that was better than the record it will change the world record variable and have it so that others can view the variable?
when I receive [ Help]
say [Thx for the help]
Last edited by Picoguy (Feb. 22, 2020 01:50:51)
- mstone326
-
Scratcher
1000+ posts
How do I add world record to my game?
You'll need to use a Cloud Variable to store a world record that anyone can beat. Set the Cloud Variable to the timer at the end of the game.
If you want to save the username as well, you'll need to look up endcoder/decoder as Cloud Variables only store numbers.
If you want to save the username as well, you'll need to look up endcoder/decoder as Cloud Variables only store numbers.
- CuriousGamer
-
Scratcher
60 posts
How do I add world record to my game?
When the game is done, set the world record to the new time if it is faster than the current record.
when I receive [start v]
reset timer
when I receive [finished v]
if <(timer) < (☁ worldrecord)> then
set [☁ worldrecord v] to (timer)
end
- Picoguy
-
Scratcher
100+ posts
How do I add world record to my game?
When the game is done, set the world record to the new time if it is faster than the current record.when I receive [start v]
reset timerwhen I receive [finished v]
if <(timer) < (☁ worldrecord)> then
set [☁ worldrecord v] to (timer)
end
But how do I make it so that it updates for the other players?
- DrGaming_92Games
-
Scratcher
100+ posts
How do I add world record to my game?
When the game is done, set the world record to the new time if it is faster than the current record.when I receive [start v]
reset timerwhen I receive [finished v]
if <(timer) < (☁ worldrecord)> then
set [☁ worldrecord v] to (timer)
end
But how do I make it so that it updates for the other players?
Seeing as it's a cloud variable it should just update for the other players as long as you're not updating it too quickly
- 26sauerdm
-
Scratcher
1 post
How do I add world record to my game?
I tried that last one and it doesnt save. how do i get it to save
- deck26
-
Scratcher
1000+ posts
How do I add world record to my game?
I tried that last one and it doesnt save. how do i get it to saveShare what you have so we can help without guessing.
- StampDanFan
-
Scratcher
100+ posts
How do I add world record to my game?
Cloud variables are the same for all “Scratchers”, as long as you don't change them too quickly.
- lScratchDogl
-
Scratcher
1 post
How do I add world record to my game?
I'm sure you have to make a cloud to save. Making a cloud takes a long time.
- what_dad
-
Scratcher
14 posts
How do I add world record to my game?
I can't add a world record to my game and I've tried your code but it doesn't work because mine doesn't use a timer
please help I'm stuck
thanks
what_dad
please help I'm stuck
thanks
what_dad
- cIoudyness
-
Scratcher
500+ posts
How do I add world record to my game?
I can't add a world record to my game and I've tried your code but it doesn't work because mine doesn't use a timerplease don’t necropost.
please help I'm stuck
thanks
what_dad
necroposting - posting on old topics and bringing them up to the top again, thereby cluttering the forums
the best way to get help is to create your own new topic.
however you could just use the above scripts provided, just adjust them for what you need. replace references to timer for your own time variable, or maybe for a score variable that you check if greater than the current record
- Discussion Forums
- » Help with Scripts
-
» How do I add world record to my game?