Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help me with Cloud data
- XPlol
- Scratcher
20 posts
Help me with Cloud data
I want an stopwatch,who the game the fastest finishes will get the highscore
when green flag clicked
add [Lets Program!] to [XPlol]
- AwesomeSmilee
- Scratcher
500+ posts
Help me with Cloud data
when I receive [game end v]
if <(time) < (☁ highscore)> then
set [☁ highscore v] to (time)
end
Last edited by AwesomeSmilee (July 24, 2017 09:51:19)
- XPlol
- Scratcher
20 posts
Help me with Cloud data
I want to see the name … I want an stopwatch,who the game the fastest finishes will get the highscore
when green flag clicked
add [Lets Program!] to [XPlol]
- XPlol
- Scratcher
20 posts
Help me with Cloud data
Does encode+decode work?I want to see the name … I want an stopwatch,who the game the fastest finishes will get the highscore
when green flag clicked
add [Lets Program!] to [XPlol]
- AwesomeSmilee
- Scratcher
500+ posts
Help me with Cloud data
Encoding and decoding would work, yes. But you need an encoder and a decoder and I can't make one right now. To start off, make each letter equal a 2-digit number: A = 01, B = 02, etc. Then turn all the letters into a long string of numbers. That is your cloud var. Then, when you want to decode, split the cloud var every 2 letters, so if you had 010203 make it split 3 times so it comes up with 01, 02 and 03. Then, just turn the numbers back into letters.
Last edited by AwesomeSmilee (July 24, 2017 10:16:38)
- NeonFrostburn
- Scratcher
100+ posts
Help me with Cloud data
when green flag clicked
forever
if <(score)>(high score) then
set [high score v] to [score]
set [high score name v] to [(username)]
end
end
WOL FY!
- XPlol
- Scratcher
20 posts
Help me with Cloud data
I already have thoz Encoding and decoding would work, yes. But you need an encoder and a decoder and I can't make one right now. To start off, make each letter equal a 2-digit number: A = 01, B = 02, etc. Then turn all the letters into a long string of numbers. That is your cloud var. Then, when you want to decode, split the cloud var every 2 letters, so if you had 010203 make it split 3 times so it comes up with 01, 02 and 03. Then, just turn the numbers back into letters.
when green flag clicked
add [Lets Program!] to [XPlol]
- elcooler
- Scratcher
24 posts
Help me with Cloud data
Use this scripts:
when green flag clicked
repeat until <(Countdown) = [0]>
change [Countdown] by (-1)
wait (1) secs
end
if <(Score) > (☁ High Score)> then
set [(☁ High Score)] to (Score)
end
Last edited by elcooler (July 24, 2017 18:45:22)
when green flag clicked
turn cw (15) degrees
broadcast [spin v]
when I receive [spin v]
turn cw (15) degrees
broadcast [spin v]
stop [only this script :) v]
Infinite spin script without forever block
- SuperSonicmario
- Scratcher
100+ posts
Help me with Cloud data
My (huge) post
Warning: Strings cannot be used in cloud variables.
scratchblocks¹ Tips:
If you want to include a variable as an argument in a text input, typeinstead of .
.
So, I tried to use a HTML escape.
It didn't work; I simply eliminated the brackets.
Stupid BBcode!
Warning: Strings cannot be used in cloud variables.
scratchblocks¹ Tips:
If you want to include a variable as an argument in a text input, type
(myvar)
[(myvar)]
set [(☁ High Score)] to (Score) // BeforeIf you want a dropdown, type
set (☁ High Score) to (Score) // After
[foo v]
change [Countdown] by (-1) // Before¹ - It's rather unfortunate. I wanted to type {scratchblocks] (replace { with [), but didn't want it to transform into a BBcode tag.
change [Countdown v] by (-1) // After
So, I tried to use a HTML escape.
It didn't work; I simply eliminated the brackets.
Stupid BBcode!
- XPlol
- Scratcher
20 posts
Help me with Cloud data
Gonna try it! But i have already an encoder and decoderwhen I receive [game end]Hopefully that helps
if <(score) < (☁ high score)> then
set [(☁ high score) ] to (score)
set (☁ username high score) to (username)
end
Im gonna use this in levels with score,Tnx BUT what is (highscore)
Last edited by XPlol (July 25, 2017 15:15:41)
when green flag clicked
add [Lets Program!] to [XPlol]
- Discussion Forums
- » Help with Scripts
- » Help me with Cloud data