Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i make a cloud list?
- M1KOCT
-
72 posts
How do i make a cloud list?
Im making a chat heres the message receival script and the problem is that i cant make the other user see the other user's message. I also made a whitelist so dont tell me that its not allowed
Last edited by M1KOCT (Oct. 9, 2020 04:59:58)
- mysterious-neutron
-
1000+ posts
How do i make a cloud list?
There are no cloud lists in scratch so you have to simulate it. Make a cloud variable and encode all the text into numbers and put it in the cloud variable.
Now decode all the numbers into letters but his time into a list
Now decode all the numbers into letters but his time into a list
- SMKAS
-
500+ posts
How do i make a cloud list?
It requires you to press space every now and then to never miss a message, and will clog up your list quickly, I already finished my example for you to know how to make an online chat(don't worry its safe).
- M1KOCT
-
72 posts
How do i make a cloud list?
what is decode what is encode? WHAT IS HAPENING? There are no cloud lists in scratch so you have to simulate it. Make a cloud variable and encode all the text into numbers and put it in the cloud variable.
Now decode all the numbers into letters but his time into a list
- SMKAS
-
500+ posts
How do i make a cloud list?
encode means turn a normal thing into another, then decode turns your “encoded” thing back to normal. Encoded means it went through the encoding process.
- deck26
-
1000+ posts
How do i make a cloud list?
Your ‘whitelist’ has to be a limited set of things can be said. If you mean a long list of words to be used in any combination that is no longer allowed. Im making a chat heres the message receival script and the problem is that i cant make the other user see the other user's message. I also made a whitelist so dont tell me that its not allowed
Since you're working with a list like that you can just ensure the item number is expanded to a fixed former (eg adding leading zeroes to ensure a 3-digit value if necessary) so you don't need to encode or decode that but if you want to include usernames you will need encoding/decoding.
Last edited by deck26 (Oct. 9, 2020 07:26:21)
- M1KOCT
-
72 posts
How do i make a cloud list?
i have a whitelist btw i dont need usernamesYour ‘whitelist’ has to be a limited set of things can be said. If you mean a long list of words to be used in any combination that is no longer allowed. Im making a chat heres the message receival script and the problem is that i cant make the other user see the other user's message. I also made a whitelist so dont tell me that its not allowed
Since you're working with a list like that you can just ensure the item number is expanded to a fixed former (eg adding leading zeroes to ensure a 3-digit value if necessary) so you don't need to encode or decode that but if you want to include usernames you will need encoding/decoding.
- creater365
-
100+ posts
How do i make a cloud list?
First a little lesson, cloud variables can ONLY store numbers. No letters or any other character. ONLY numbers. And in this case, encoding means to turn text –> numbers. Decoding is turning encoded numbers –> text. This is basically how cloud variables work. And since scratch added a cloud variable limit, you want to compress things as much as possible. In this case, since you're using a list of phrases you can say, you only want to include the item # of the thing that's being said saved to the cloud variable. The reason is that a number is much shorter than saving the whole phrase. If you're confused, here is an example.
Say we have a list of phrases:
“Hello!”, “Goodbye!”
You want to save 1 to the cloud variable instead of the whole word hello encoded. This is because hello encoded takes up more space, making fewer messages being able to be sent. In this case, if you wanted to make this work you'd first have to connect a “ask and wait” block and ask them for item # of phrase they're gonna say. You then encode it into numbers, set the cloud variable to join cloud variable encoded answer. You then create a list for the chat, tell it to forever delete all of the chat list, and decode the cloud variable. If you need more help, tell me.
Say we have a list of phrases:
“Hello!”, “Goodbye!”
You want to save 1 to the cloud variable instead of the whole word hello encoded. This is because hello encoded takes up more space, making fewer messages being able to be sent. In this case, if you wanted to make this work you'd first have to connect a “ask and wait” block and ask them for item # of phrase they're gonna say. You then encode it into numbers, set the cloud variable to join cloud variable encoded answer. You then create a list for the chat, tell it to forever delete all of the chat list, and decode the cloud variable. If you need more help, tell me.
- SMKAS
-
500+ posts
How do i make a cloud list?
Like this?
https://scratch.mit.edu/projects/434346645/
I already made this for them, maybe try modifying it for their needs.
https://scratch.mit.edu/projects/434346645/
I already made this for them, maybe try modifying it for their needs.
- Discussion Forums
- » Help with Scripts
-
» How do i make a cloud list?