Discuss Scratch

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.

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

Katharina_Scorpio wrote:

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

Katharina_Scorpio wrote:

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

ScratchGaming42 wrote:

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

AksharPremnath wrote:

ScratchGaming42 wrote:

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.
It'll work for setting your own high score, which appears to be what the user is asking for.
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

cwkadam55331 wrote:

Try this script:
when green flag clicked
forever
if <(☁cloud score) > (score)> then
set [☁cloud score v] to (score)
end
end
this wouldnt work, operators are switched around
Frotnorer
Scratcher
25 posts

I need help with creating a high score

ScratchGaming42 wrote:

when I receive [game end v]
if <(player score) > (high score)> then
set [high score v] to (player score)
end

This should work
This will only work if you replace the high score variable to a cloud variable
Yusei-Fudo
Scratcher
1000+ posts

I need help with creating a high score

ScratchGaming42 wrote:

AksharPremnath wrote:

ScratchGaming42 wrote:

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.
It'll work for setting your own high score, which appears to be what the user is asking for.

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 <(time) < (☁ score)> then
set [☁ score v] to (time)
end
If you're making any other game that isn't a race then
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

Katharina_Scorpio wrote:

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.

when green flag clicked
forever
if <(foo) < (foo)> then
set [ v] to (foo)
end
end

Thanks ^^

Katharina
Hey so try griffpatch's clever binary cloud list! See what he has to say.
Katharina_Scorpio
Scratcher
12 posts

I need help with creating a high score

Thanks Guys!!! You helped me a lot!

Powered by DjangoBB