Discuss Scratch

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

XPlol wrote:

I want an stopwatch,who the game the fastest finishes will get the highscore

I want to see the name …

when green flag clicked
add [Lets Program!] to [XPlol]
XPlol
Scratcher
20 posts

Help me with Cloud data

XPlol wrote:

XPlol wrote:

I want an stopwatch,who the game the fastest finishes will get the highscore

I want to see the name …
Does encode+decode work?

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

AwesomeSmilee wrote:

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.
I already have thoz

when green flag clicked
add [Lets Program!] to [XPlol]
coding4life22
Scratcher
66 posts

Help me with Cloud data

when I receive [game end]
if <(score) < (☁ high score)> then
set [(☁ high score) ] to (score)
set (☁ username high score) to (username)
end
Hopefully that helps


“We believe in ordinary acts of bravery, in the courage that drives one person to stand up for another.” -Divergent








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, type
(myvar)
instead of
[(myvar)]
.
set [(☁ High Score)] to (Score) // Before

set (☁ High Score) to (Score) // After
If you want a dropdown, type
[foo v]
.
change [Countdown] by (-1) // Before

change [Countdown v] by (-1) // After
¹ - It's rather unfortunate. I wanted to type {scratchblocks] (replace { with [), but didn't want it to transform into a BBcode tag.
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

coding4life22 wrote:

when I receive [game end]
if <(score) < (☁ high score)> then
set [(☁ high score) ] to (score)
set (☁ username high score) to (username)
end
Hopefully that helps
Gonna try it! But i have already an encoder and decoder
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]

Powered by DjangoBB