Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scratch Cloud Variable Help
- ClearlyObvious17
-
21 posts
Scratch Cloud Variable Help
I'm making a project on turbowarp and idk how to make it so that you if you join a certain match, you'll only see the person in your match and not someone in a another match
- DragonPlusMaster
-
100+ posts
Scratch Cloud Variable Help
Cloud variables are temporarily broken right now, and have been for the past few weeks. The ST is working hard on it.
- ametrine_
-
1000+ posts
Scratch Cloud Variable Help
cloud variables are not broken on turbowarp, which is where he is making the project Cloud variables are temporarily broken right now, and have been for the past few weeks. The ST is working hard on it.
- DragonPlusMaster
-
100+ posts
Scratch Cloud Variable Help
Oh, my bad.cloud variables are not broken on turbowarp, which is where he is making the project Cloud variables are temporarily broken right now, and have been for the past few weeks. The ST is working hard on it.
- OwlAndWolf
-
47 posts
Scratch Cloud Variable Help
Do you plan on sharing this on scratch? If not, there is a very easy way to do this.
*NOTE - PLEASE READ THROUGH THE FULL METHOD THAT YOU CHOSE, AS IT MOST LIKELY WILL WORK.*
Lets start with the harder way, and you can skip to the easier way if that is what you are planning.
In order to do this if it's being shared on scratch, each player needs their data stored in 1 cloud variable. With this system, you can have up to 5 matches in 1 server(10(maximum number of cloud variables in a project) divided by 2(number of players in a match). In order to make multiple servers, simply duplicate the project and rename it to “(project name) SERVER 2”). Presumably you already have this implemented, so let's move onto your problem. In order to differentiate between matches, simply have a number in each player's data variable that represents which match number they are in. This number can be set to a random number between 1 and 5, repeated until the match that is chosen is not full.
The much easier way to do this, if you are not sharing this on scratch, is with Turbowarp's “Special cloud variable behaviors like HTMLifier” setting. This is not enabled by default, meaning that if you are using the Turbowarp packager, you have to set it to true manually in “Cloud variables”. Anyways, inside the project, create a cloud variable named “room id”. You can then change it to whatever value you want. This value allows you to have different versions of each cloud variable, depending on the server. This feature is better explained by the Turbowarp Documentation. In order to add joining, add a new cloud variable named “Match full?”, and if the match has two players, set it to one. If else, set it to zero(do this every frame in your scripts in order to dynamically update the value. Then, at the start of the project, simply set the id to a random number between (1) and (However many matches you want going on). Then repeat that step until “Match full?” is equal to zero, indicating that the current server is open.
*NOTE - PLEASE READ THROUGH THE FULL METHOD THAT YOU CHOSE, AS IT MOST LIKELY WILL WORK.*
Lets start with the harder way, and you can skip to the easier way if that is what you are planning.
In order to do this if it's being shared on scratch, each player needs their data stored in 1 cloud variable. With this system, you can have up to 5 matches in 1 server(10(maximum number of cloud variables in a project) divided by 2(number of players in a match). In order to make multiple servers, simply duplicate the project and rename it to “(project name) SERVER 2”). Presumably you already have this implemented, so let's move onto your problem. In order to differentiate between matches, simply have a number in each player's data variable that represents which match number they are in. This number can be set to a random number between 1 and 5, repeated until the match that is chosen is not full.
The much easier way to do this, if you are not sharing this on scratch, is with Turbowarp's “Special cloud variable behaviors like HTMLifier” setting. This is not enabled by default, meaning that if you are using the Turbowarp packager, you have to set it to true manually in “Cloud variables”. Anyways, inside the project, create a cloud variable named “room id”. You can then change it to whatever value you want. This value allows you to have different versions of each cloud variable, depending on the server. This feature is better explained by the Turbowarp Documentation. In order to add joining, add a new cloud variable named “Match full?”, and if the match has two players, set it to one. If else, set it to zero(do this every frame in your scripts in order to dynamically update the value. Then, at the start of the project, simply set the id to a random number between (1) and (However many matches you want going on). Then repeat that step until “Match full?” is equal to zero, indicating that the current server is open.
- hunterrocket
-
12 posts
Scratch Cloud Variable Help
It’s broken 4 everyone now. Idk why, it happening to my project too
- EpicGhoul993
-
1000+ posts
Scratch Cloud Variable Help
Can you just force certain cloudvar holders to only read from another specific cloudvar? For example, cloudvar 1 and 2 players can only read each other's data, then 3 and 4, etc.
For this system to work you would only need a room ID starting from 0. Everyone in room n would then only be able to access cloudvars numbered (2n+1) and (2n+2). If you then number the players in the room with p for example, each player will be able to edit var (2n+p) and read var (2n+3-p).
For this system to work you would only need a room ID starting from 0. Everyone in room n would then only be able to access cloudvars numbered (2n+1) and (2n+2). If you then number the players in the room with p for example, each player will be able to edit var (2n+p) and read var (2n+3-p).
- Oisthebestletter
-
100+ posts
Scratch Cloud Variable Help
I don't know how to do this, but I'm pretty sure you can use ScratchAttach to host a Scratch cloud project on Turbowarp's cloud variables.
- Hunter_Max
-
1 post
Scratch Cloud Variable Help
Hello everyone, I've been experiencing problems with my cloud variables and would appreciate some help. Lately, I've been working on an online platformer, but I can't seem to get changes in cloud variables to show on other screens. Furthermore, “See Data” buttons for the cloud variables underneath my projects seems to be glitched as well, for it is seeming to load forever. I am not a New Scratcher, and I've used cloud variables before in past unshared games, but the cloud variable usage for the past months seem to be broken. I've checked the Scratch Wiki, but sadly, couldn't find anything. I've heard setting cloud variables too quickly will lock them, but even the script: "{when this sprite clicked} - [change by (1)]", doesn't work. Does anyone know how to fix this?
Last edited by Hunter_Max (Jan. 1, 2025 09:50:13)
- NotK3ndricAltAgain
-
500+ posts
Scratch Cloud Variable Help
please make a new topic for this Hello everyone, I've been experiencing problems with my cloud variables and would appreciate some help. Lately, I've been working on an online platformer, but I can't seem to get changes in cloud variables to show on other screens. Furthermore, “See Data” buttons for the cloud variables underneath my projects seems to be glitched as well, for it is seeming to load forever. I am not a New Scratcher, and I've used cloud variables before in past unshared games, but the cloud variable usage for the past months seem to be broken. I've checked the Scratch Wiki, but sadly, couldn't find anything. I've heard setting cloud variables too quickly will lock them, but even the script: "{when this sprite clicked} - [change by (1)]", doesn't work. Does anyone know how to fix this?
- xXluigi-comXx
-
12 posts
Scratch Cloud Variable Help
They dont work right now. Cloud API's are closed, but still, Turbowarp can still reach to the api.
If you are trying running this in scratch right now (EXAMPLE),
If you are trying running this in scratch right now (EXAMPLE),
Cloud will only work on turbowarp. To get the token, you could use Scratch extensions to unlock it or just type https://turbowarp.org/<Your Project ID> to use them.
- ametrine_
-
1000+ posts
Scratch Cloud Variable Help
turbowarp actually has a completely separate cloud server, which is why it's not broken They dont work right now. Cloud API's are closed, but still, Turbowarp can still reach to the api.
- Discussion Forums
- » Help with Scripts
-
» Scratch Cloud Variable Help