Discuss Scratch

GoldBackthewebAlext
Scratcher
100+ posts

Detecting if the user is online or offline

How can I detect if the user is online or offline (aka using scratch.mit.edu or the Scratch Desktop app)?
I don't want to know if an specific person is online or not, I need to know if the project is being used in scratch.mit.edu or the Scratch Desktop program with code.

Last edited by GoldBackthewebAlext (Sept. 2, 2021 18:10:24)

AndreiFren64
Scratcher
100+ posts

Detecting if the user is online or offline

You cannot. That would, i believe, be against the scatch TOS.
GoldBackthewebAlext
Scratcher
100+ posts

Detecting if the user is online or offline

AndreiFren64 wrote:

You cannot. That would, i believe, be against the scatch TOS.
What? Why?
AndreiFren64
Scratcher
100+ posts

Detecting if the user is online or offline

GoldBackthewebAlext wrote:

AndreiFren64 wrote:

You cannot. That would, i believe, be against the scatch TOS.
What? Why?
Breach of privacy, I would imagine. People don't want strangers constantly knowing what they're doing.
Nezon
Scratcher
1000+ posts

Detecting if the user is online or offline

You can't detect if someone is online, there's no API for that. If the scratch team did, then a offline/online feature would exist
TheOrangeCatKid
New Scratcher
22 posts

Detecting if the user is online or offline

AndreiFren64 wrote:

You cannot. That would, i believe, be against the scatch TOS.
Kumquats lol
SansStudios
Scratcher
1000+ posts

Detecting if the user is online or offline

GoldBackthewebAlext wrote:

How can I detect if the user is online or offline (aka using scratch.mit.edu or the Scratch Desktop app)?
You can, however, detect if a signed-in scratcher is on one of your project using cloud variables.
GoldBackthewebAlext
Scratcher
100+ posts

Detecting if the user is online or offline

AndreiFren64 wrote:

Breach of privacy, I would imagine. People don't want strangers constantly knowing what they're doing.
No no, I'm refering to detect if the user that is currently using the project is connected to the internet or no aka using scratch.mit.edu or the Scratch Desktop app.
GoldBackthewebAlext
Scratcher
100+ posts

Detecting if the user is online or offline

Nezon wrote:

You can't detect if someone is online, there's no API for that. If the scratch team did, then a offline/online feature would exist

SansStudios wrote:

You can, however, detect if a signed-in scratcher is on one of your project using cloud variables.
|
|
\/

GoldBackthewebAlext wrote:

aka using scratch.mit.edu or the Scratch Desktop app
I am talking about the user using a project.
MathPuppy314
Scratcher
500+ posts

Detecting if the user is online or offline

Maybe you should try looking at a Cloud Multiplayer Tutorial. It should give you some information for how to detect if a user who wants to use your project is connected to the cloud.
orangetheory
Scratcher
500+ posts

Detecting if the user is online or offline

If you are looking for a way to check if someone is online, it is best to look through the cloud.
Here is a great project to aid you:https://scratch.mit.edu/projects/408392189/
Although it is not allowed to detect whether or not someone else is online without permission, if the user themselves has shared the project to tell whether or not they are online, it is ok, since the the owner of the project has shared it themselves.
Note: most online/offline detector projects aren't exactly reliable, as they don't update real-time, and it does take a while to process the data.
LG125
Scratcher
500+ posts

Detecting if the user is online or offline

AndreiFren64 wrote:

You cannot. That would, i believe, be against the scatch TOS.
It’s possible, I’ve seen it before. Lemme just quickly look for the link…

Edit: link in post above works.

Last edited by LG125 (Sept. 2, 2021 15:19:33)

GoldBackthewebAlext
Scratcher
100+ posts

Detecting if the user is online or offline

GUYS GUYS, I don't want to know if an specific person is online or not, I need to know if the project is being used in scratch.mit.edu or the Scratch Desktop program with code.
LG125
Scratcher
500+ posts

Detecting if the user is online or offline

GoldBackthewebAlext wrote:

GUYS GUYS, I don't want to know if an specific person is online or not, I need to know if the project is being used in scratch.mit.edu or the Scratch Desktop program with code.
Ah.

This seems to be something that wouldn’t be possible, but idk. Never had any experience with the desktop
bombardingppl
Scratcher
500+ posts

Detecting if the user is online or offline

GoldBackthewebAlext wrote:

GUYS GUYS, I don't want to know if an specific person is online or not, I need to know if the project is being used in scratch.mit.edu or the Scratch Desktop program with code.
Scratch doesn't really detect anything outside of the project. I don't know if you mean to detect when a player exists or leaves, etc.
RvylDaCoder
Scratcher
4 posts

Detecting if the user is online or offline

I think i can do something that can make you able to see if someone is online but I haven't tested it.
when green flag clicked
if <[Online?] = [0]> then
add (username) to [list v]
set [Online? v] to [1]



else
delete (item # of (username) in [list v]) of [list v]

end

Last edited by RvylDaCoder (Dec. 9, 2024 18:38:51)

RvylDaCoder
Scratcher
4 posts

Detecting if the user is online or offline

.

Last edited by RvylDaCoder (Dec. 9, 2024 18:29:12)

nembence
Scratcher
500+ posts

Detecting if the user is online or offline

Trying to tanslate something new returns an empty string when there is no internet connection (old translates can be cached sometimes on the computer), but I only tested it in the online editor

Last edited by nembence (Dec. 9, 2024 22:29:39)

Emeraldore12
Scratcher
100+ posts

Detecting if the user is online or offline

If cloud variables do not work in the offline version of scratch, then go to the website, set the cloud variable to a number higher than 0 in the project, and in the offline version of scratch, if the variable equals 0, then you should be in the offline version.
Oisthebestletter
Scratcher
100+ posts

Detecting if the user is online or offline

Use the translate extension. it requires you to be online. This video goes into detail.

Powered by DjangoBB