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

#1 2012-06-01 14:41:35

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

on leave block

this is a hat block where it does something when you leave a project, a little like the define block, this could be useful for online games and chatrooms.


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#2 2012-06-01 14:53:15

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: on leave block

Tbtemplex97 wrote:

this is a hat block where it does something when you leave a project, a little like the define block, this could be useful for online games and chatrooms.

Technically you could have a cloud list which is named 'active'. Then you could make it so every five seconds or so a variable named 'check for active' would change to 'check' and all of the running scripts which read the variable 'check for active' would add the user to the list.
Before this it would delete all from the cloud list.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#3 2012-06-01 15:37:54

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: on leave block

Pecola1 wrote:

Tbtemplex97 wrote:

this is a hat block where it does something when you leave a project, a little like the define block, this could be useful for online games and chatrooms.

Technically you could have a cloud list which is named 'active'. Then you could make it so every five seconds or so a variable named 'check for active' would change to 'check' and all of the running scripts which read the variable 'check for active' would add the user to the list.
Before this it would delete all from the cloud list.

i think that the best way would be to assign moderators, that way they could press a button which deletes all from a list of online players and then an automatic code from other players which adds themselves back to the list, then to count the players, u give a 2 second delay and set a variable to the lenght of online players.


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#4 2012-06-02 14:05:57

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: on leave block

bump


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

Board footer