Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help with creating a high score
- Katharina_Scorpio
-
Scratcher
12 posts
I need help with creating a high score
Hey!
I am trying to create a high score-variable without using the cloud variables. Did someone already do this and could help me with it? I used the script below but it didn't really work.
Thanks ^^
Katharina
I am trying to create a high score-variable without using the cloud variables. Did someone already do this and could help me with it? I used the script below but it didn't really work.
when green flag clicked
forever
if <(foo) < (foo)> then
set [ v] to (foo)
end
end
Thanks ^^
Katharina
- ScratchGaming42
-
Scratcher
33 posts
I need help with creating a high score
when I receive [game end v]
if <(player score) > (high score)> then
set [high score v] to (player score)
end
This should work
- AksharPremnath
-
Scratcher
500+ posts
I need help with creating a high score
I used the script below but it didn't really work.
~scratchblocks~
It didn't work because you didn't use cloud variables:
when green flag clicked
forever
if <(score) > (☁ high score)> then
set [☁ high score v] to (score)
end
end
I am trying to create a high score-variable without using the cloud variables
You can't. Unless you want it so that only you can set high scores.
- AksharPremnath
-
Scratcher
500+ posts
I need help with creating a high score
when I receive [game end v]
if <(player score) > (high score)> then
set [high score v] to (player score)
end
This should work
It won't.
- ScratchGaming42
-
Scratcher
33 posts
I need help with creating a high score
It'll work for setting your own high score, which appears to be what the user is asking for.when I receive [game end v]
if <(player score) > (high score)> then
set [high score v] to (player score)
end
This should work
It won't.
- cwkadam55331
-
Scratcher
47 posts
I need help with creating a high score
Try this script:
when green flag clicked
forever
if <(☁cloud score) > (score)> then
set [☁cloud score v] to (score)
end
end
- dudemanwest
-
Scratcher
100+ posts
I need help with creating a high score
Try this script:this wouldnt work, operators are switched aroundwhen green flag clicked
forever
if <(☁cloud score) > (score)> then
set [☁cloud score v] to (score)
end
end
- Frotnorer
-
Scratcher
25 posts
I need help with creating a high score
This will only work if you replace the high score variable to a cloud variablewhen I receive [game end v]
if <(player score) > (high score)> then
set [high score v] to (player score)
end
This should work
- Yusei-Fudo
-
Scratcher
1000+ posts
I need help with creating a high score
It'll work for setting your own high score, which appears to be what the user is asking for.when I receive [game end v]
if <(player score) > (high score)> then
set [high score v] to (player score)
end
This should work
It won't.
Yes but that won't save anything. Set a new record, and reload the project. You'll see that your high score is erased.
- The_Imaginarium
-
Scratcher
1000+ posts
I need help with creating a high score
It depends what you're making.
If you're making a speedrun type game then you'll want
If you're making a speedrun type game then you'll want
if <(time) < (☁ score)> thenIf you're making any other game that isn't a race then
set [☁ score v] to (time)
end
if <(score) > (☁ score)> then
set [☁ score v] to (score)
end
- KoolCoder25
-
Scratcher
11 posts
I need help with creating a high score
if <(my score) > (☁ score)> then
set [ (☁ score)] to (my score)
end
I hope this helps
- natdilt
-
Scratcher
100+ posts
I need help with creating a high score
Hey!Hey so try griffpatch's clever binary cloud list! See what he has to say.
I am trying to create a high score-variable without using the cloud variables. Did someone already do this and could help me with it? I used the script below but it didn't really work.when green flag clicked
forever
if <(foo) < (foo)> then
set [ v] to (foo)
end
end
Thanks ^^
Katharina
- Katharina_Scorpio
-
Scratcher
12 posts
I need help with creating a high score
Thanks Guys!!! You helped me a lot!
- Discussion Forums
- » Help with Scripts
-
» I need help with creating a high score