Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make a high score that changes whenever someone beats it.
- MKK2000
- Scratcher
3 posts
how to make a high score that changes whenever someone beats it.
for this project i have been doing lately i made a score board in my info section but i want to make a high score thing that automatically appears on the screen once you loose with top five people. please help me
- Poosheku
- Scratcher
72 posts
how to make a high score that changes whenever someone beats it.
Your game sounds pretty cool! Okay, you'll need 6 variables, 5 Cloud Variables (To make a Cloud Variable just check the Box when you enter the Variable name.). Let's call the non-cloud one “Score base” and the clouds “Hi-Score1”, “Hi-Score2”, and so on. Use score base as your score counter. Now just do this:
Hope this helps!
P.S. When your game is finished please give me the link on my profile. I really want to play it! Thx!
when I receive [ end of game v]
if < (score base) > (Hi-Score5) > then // make sure Hi-score5 is your lowest score.
if < (score base) > (Hi-Score4) > then
do the same for the rest of the scores
else
set (Hi-Score5) to (Score base)
end
end
Hope this helps!
P.S. When your game is finished please give me the link on my profile. I really want to play it! Thx!
- MKK2000
- Scratcher
3 posts
how to make a high score that changes whenever someone beats it.
i got the high score thing working but whenever you set a new high score 1 it makes all the high scores equal to that! please look at my code it is in my back drop and help me!1\
Last edited by MKK2000 (Nov. 22, 2013 01:25:39)
- AwesomeBoy125
- Scratcher
21 posts
how to make a high score that changes whenever someone beats it.
I will add that high score thing to my new game
LINK TO GAME: http://scratch.mit.edu/projects/18520644/
LINK TO GAME: http://scratch.mit.edu/projects/18520644/
- typemaster
- Scratcher
100+ posts
how to make a high score that changes whenever someone beats it.
when I receive [end of game]
if <(score) > (high_score)> then
set [high_score] to (score)
end
Make sure the variable high_score is a cloud variable and score is not.
Owner of TPM!!!!
when green flag clicked
forever
set [what I'm doing] to [playing destiny]
end
- derpmeup
- Scratcher
1000+ posts
how to make a high score that changes whenever someone beats it.
when I receive [End v]
if <(Score) > (☁ High Score 5)> then
set [☁ High Score 5 v] to (Score)
else
if <(☁ High Score 5) > (☁ High Score 4)> then
set [☁ High Score 4 v] to (☁ High Score 5)
else
if <(☁ High Score 4) > (☁ High Score 3)> then
set [☁ High Score 3 v] to (☁ High Score 4)
else
if <(☁ High Score 3) > (☁ High Score 2)> then
set [☁ High Score 2 v] to (☁ High Score 3)
else
if <(☁ High Score 2) > (☁ High Score)> then
set [☁ High Score v] to (☁ High Score 2)
end
end
end
end
end
Hope that helped!
Last edited by derpmeup (April 13, 2014 01:12:56)
hey bro that's a pretty good meme xD!
- LinusStarck
- New to Scratch
1 post
how to make a high score that changes whenever someone beats it.
i cant make clound variables, why?
- Paddle2See
- Scratch Team
1000+ posts
how to make a high score that changes whenever someone beats it.
i cant make clound variables, why?
For a good explanation of the New Scratcher rank, and it's limitations with respect to Cloud Variables, please see this topic
Scratch Team Member, kayak and pickleball enthusiast, cat caregiver.
This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
(credit to Za-Chary)
;
- Discussion Forums
- » Help with Scripts
- » how to make a high score that changes whenever someone beats it.