This is a tutorial of how to encode a username (or any other word) into a number so it can be turned into cloud data. This can be used to back up username variables to make sure they are saved. Press see inside to see tutorial notes and script. This is also explained below. If you use this script for a project, please credit me and comment the project below so I can see. Thank you :) Also keep in mind that if you are a New Scratcher you can not use this tutorial because it uses cloud variables. Come back when you are a Scratcher! Also, this turns all letters into caps because it is not case sensitive. There are other tutorials that are case sensitive, but I think this is one of the simplest. #tutorial #cloudvariables #cloudvariableusername #usernameencoder #worldrecordscript #worldrecordusername #encoder #decoder
TO USE THIS SCRIPT: There are 3 options for anyone who wants to use this script in their own project: -The easiest way is to remix this and delete any extra sprites. This keeps the cloud variables. -If you don't want to remix this you can use the backpack feature to take the script. KEEP IN MIND that if you do this you will have to delete and remake the cloud variables for them to work, meaning that you will have to replace any spot they are used with the new variable. You will also have to remake the alphabet list. -Finally you can remake this scrip by just making it in another project while having this tab open to look back at it. -If you use this script in any of your projects, please credit me by putting in your project notes. -Comment if this helps or if you have any questions :) HOW IT WORKS: How this works is first the game activates the script when the score is higher than the world record. If it is, it updates the record then encodes the username by matching each character to a corresponding number using the alphabet list. The list skips double digits with a zero by putting an illegal character like ‹, *, or ø in the slot. This is because the decoder uses zeros to separate characters. After that, the script puts the numbers together with zeros in between numbers, then sets the cloud variable to the number. When the decoding script is run, it takes the cloud variable and separates numbers by skipping zeros and adding them to a list. Each number is then matched up with the alphabet list once again and put together to make the completed username! I needed to figure out how to do this for my game Bounce Boom (link at the bottom of notes). For some reason the Username variable would not save, and so I decided to use a cloud variable (yes, I know that I could have just updated it by checking the cloud data. This is better). But cloud data can only be numbers to save. So I had to make a username encoder/decoder. And I did! So I decided to make this tutorial for anyone else who may need this. Bounce Boom Game: