This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-11-22 19:31:24

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

How can you tell if you are online?

as seen here: http://scratch.mit.edu/projects/Dibbo222/929092 (Made by dibbo222) how do you make a project that senses whether a project is being viewed online or not?


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

#2 2010-11-22 19:34:16

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How can you tell if you are online?

Basically, the offline player stops when it hits a mathematical error (such as 0/0), but the online player skips over it and goes on to the next block. So if you put a script like this:

Code:

When green flag clicked
Set online? to no
move 0/0 steps
Set online? to yes

the project would set the variable in relation to if the project was being viewing online or not.

Last edited by Harakou (2010-11-22 19:35:14)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2010-11-22 19:36:50

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: How can you tell if you are online?

Harakou wrote:

Basically, the offline player stops when it hits a mathematical error (such as 0/0), but the online player skips over it and goes on to the next block. So if you put a script like this:

Code:

When green flag clicked
Set online? to no
move 0/0 steps
Set online? to yes

the project would set the variable in relation to if the project was being viewing online or not.

Thanks! I will add that to the project I am going to post (that is very large) right now...


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

#4 2010-11-22 19:37:50

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: How can you tell if you are online?

Let me just copy/paste that code for later...


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

Board footer