Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » using cloud variables to store words on the cloud
- skitzoid
-
Scratcher
30 posts
using cloud variables to store words on the cloud
I have noticed that you can only have numbers in cloud variables, but there are ways to convert words to numbers so that they can be used in cloud variables. Anyone know a good tutorial or can make one?
☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁
I have gotten it to work and will soon be using the same tactic to make online multiplayer games. As of 9/12/16, none are shared, but if it is later, i may have shared them. check my profile,. if you have anything to add, or are looking for help, check it out or comment here!
☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁☁
I have gotten it to work and will soon be using the same tactic to make online multiplayer games. As of 9/12/16, none are shared, but if it is later, i may have shared them. check my profile,. if you have anything to add, or are looking for help, check it out or comment here!
Last edited by skitzoid (Sept. 13, 2016 06:37:21)
- MiiandMario
-
Scratcher
10 posts
using cloud variables to store words on the cloud
Unfortunately, you can't actually put words in a cloud variable. But there is another method. Instead of having words use numbers like shown below. (P.S.
(C) is a cloud)
(C) is a cloud)
change [(C) Number] by (1)
if <[(C) Number] = [1]> then
add [Amazing] to [numbertoword]
end
Last edited by MiiandMario (Sept. 9, 2016 23:37:07)
- asivi
-
Scratcher
1000+ posts
using cloud variables to store words on the cloud
I have noticed that you can only have numbers in cloud variables, but there are ways to convert words to numbers so that they can be used in cloud variables. Anyone know a good tutorial or can make one?Coding and Encoding for Cloud Variables
- skitzoid
-
Scratcher
30 posts
using cloud variables to store words on the cloud
Unfortunately, you can't actually put words in a cloud variable. But there is another method. Instead of having words use numbers like shown below. (P.S.I understand, but it would be very difficult to use that method if you wanted to record a persons username. I am developing a way currently that should work, i just wanted to see if there were easier ways. thanks for the help though!
(C) is a cloud)change [(C) Number] by (1)
if <[(C) Number] = [1]> then
add [Amazing] to [numbertoword]
end
- gtoal
-
Scratcher
1000+ posts
using cloud variables to store words on the cloud
I understand, but it would be very difficult to use that method if you wanted to record a persons username. I am developing a way currently that should work, i just wanted to see if there were easier ways. thanks for the help though!search scratch for ‘cloud encoder’ and pick one that lets you save arrays.
- deck26
-
Scratcher
1000+ posts
using cloud variables to store words on the cloud
Any ‘cloud list’ project is presumably doing this so search for those. The basic method is to look at each letter in turn and convert it to a 2-digit number by comparing it either to each item in a list (containing a, b, c, d etc) or each letter of a text variable like ‘abcdefg….’. Make sure you use leading zeroes if you would get a one digit number. So ‘deck’ would probably encode to ‘04050311’. You also need to encode numbers which are part of the username in the same way or you could quickly check if the character is a digit and add 90 to it if it is so ‘deck26’ becomes ‘040503119296’.
Finally you need some way of telling when one username is finished and another begins. Most people use something like ‘00’ as a separator but in my cloud list I stored the length of the username before each one which means I can quickly look through for one of a specific length - eg to see if the current username is in the list.
Finally you need some way of telling when one username is finished and another begins. Most people use something like ‘00’ as a separator but in my cloud list I stored the length of the username before each one which means I can quickly look through for one of a specific length - eg to see if the current username is in the list.
- skitzoid
-
Scratcher
30 posts
using cloud variables to store words on the cloud
Any ‘cloud list’ project is presumably doing this so search for those. The basic method is to look at each letter in turn and convert it to a 2-digit number by comparing it either to each item in a list (containing a, b, c, d etc) or each letter of a text variable like ‘abcdefg….’. Make sure you use leading zeroes if you would get a one digit number. So ‘deck’ would probably encode to ‘04050311’. You also need to encode numbers which are part of the username in the same way or you could quickly check if the character is a digit and add 90 to it if it is so ‘deck26’ becomes ‘040503119296’.Thanks. but luckily i wont need to record multiple usernames in the project i need it for. I just want to record the name of the person who holds the highscore
Finally you need some way of telling when one username is finished and another begins. Most people use something like ‘00’ as a separator but in my cloud list I stored the length of the username before each one which means I can quickly look through for one of a specific length - eg to see if the current username is in the list.
- amylaser
-
Scratcher
500+ posts
using cloud variables to store words on the cloud
Here's a tutorial: https://scratch.mit.edu/discuss/topic/91772/
Also, if you want, you can check out the encoding and decoding custom blocks inside the “cloud text” sprite of this project of mine: https://scratch.mit.edu/projects/117755523/ It only encodes a single username, just like what you seem to be looking for
Also, if you want, you can check out the encoding and decoding custom blocks inside the “cloud text” sprite of this project of mine: https://scratch.mit.edu/projects/117755523/ It only encodes a single username, just like what you seem to be looking for

Last edited by amylaser (Sept. 13, 2016 04:02:58)
- skitzoid
-
Scratcher
30 posts
using cloud variables to store words on the cloud
Here's a tutorial: https://scratch.mit.edu/discuss/topic/91772/thanks, but i already made it work on my own. i may use it for simplification though
Also, if you want, you can check out the encoding and decoding custom blocks inside the “cloud text” sprite of this project of mine: https://scratch.mit.edu/projects/117755523/ It only encodes a single username, just like what you seem to be looking for
- -Firesnake-
-
Scratcher
79 posts
using cloud variables to store words on the cloud
Unfortunately, you can't use words in cloud variables. But you can use numbers.
Yippee!
- @-Firesnake-
Yippee!
- @-Firesnake-
- Discussion Forums
- » Help with Scripts
-
» using cloud variables to store words on the cloud