Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game
- Mozboz
-
1000+ posts
Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game
Title says it all, how do I detect when a Scratcher can't use cloud variables?
RESOLVED! Thanks to everyone who helped out with this. MillionOfficial wrote actual code whereas the other's just helped in words, so that was a big help. Here's a quote of the post that contains the actual code:
RESOLVED! Thanks to everyone who helped out with this. MillionOfficial wrote actual code whereas the other's just helped in words, so that was a big help. Here's a quote of the post that contains the actual code:
If you're facing the same issue, try the above code written by MillionOfficial. I will now close the topic.
Last edited by Mozboz (Oct. 14, 2024 11:49:24)
- GamesReinvented
-
100+ posts
Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game
If you have a cloud variable saved to for example “0” when saving the project, if you change it with code (without saving the project), for example if username = Mozboz change the variable by 1, the scratch servers will have it saved as one, but any signed out person/new scratcher opening the project will have it as 0, because scratch won't update due to them being a new scratcher.
Using this, you could have a simple script checking if the variable is equal to 0, and if it is they're a new scratcher.
For signed out people, you can easily check like so:
Using this, you could have a simple script checking if the variable is equal to 0, and if it is they're a new scratcher.
For signed out people, you can easily check like so:
- RokCoder
-
1000+ posts
Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game
This is a short project that detects whether a user is a Scratcher, New Scratcher or not logged in - basically what @GamesReinvented said above but with the additional check for someone not being logged in.
Last edited by RokCoder (Oct. 3, 2024 08:36:12)
- MillionOfficial
-
500+ posts
Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game
- Mozboz
-
1000+ posts
Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game
RESOLVED! Thanks to everyone who helped out with this. MillionOfficial wrote actual code whereas the other's just helped in words, so that was a big help. Here's a quote of the post that contains the actual code:
If you're facing the same issue, try the above code written by MillionOfficial. I will now close the topic.
- Discussion Forums
- » Help with Scripts
-
» Creating a New Scratcher/signed out checker to the "Online Multiplayer" button in my game