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

#1 2012-05-29 19:34:32

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

New way to read broadcasts

It gets really annoying to have a cap block as the only way to receive broadcasts, so for Scratch 2.0 I would like something else:

if <I receive (broadcast v)>
   do stuff
.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#2 2012-05-29 20:15:50

Bklecka
Scratcher
Registered: 2011-08-27
Posts: 1000+

Re: New way to read broadcasts

we all want that.
i support


http://i48.tinypic.com/106ijc9.jpg

Offline

 

#3 2012-05-30 08:26:32

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: New way to read broadcasts

For now,

 
broadcast [whatevs v]
 
when I receive [whatevs v]
set [I received whatevs v] to [yes]
 
forever
if <(I received whatevs)=[yes]>
do stuff


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#4 2012-05-30 12:18:06

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: New way to read broadcasts

This gets suggested all the time, and it's not necessarily a bad idea, but it's not clear exactly how this would work. Because a broadcast is an event, it only happens for an instant. But Ifs normally look at things that stay true (or false) until something changes them, like "does X = 3" or "am I touching red".


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#5 2012-05-31 10:28:08

likegames
Scratcher
Registered: 2008-03-24
Posts: 100+

Re: New way to read broadcasts

when gf clicked
say [Please read!!!]
Yeah, there are two types of triggers, instantaneous and continuous. Instantaneous only gives one quick trigger, and continuous gives a long trigger. You are suggesting essentially a
<[broadcast v] is being recieved>
A broadcast, however, you can't expect to get in the middle of a script: the if and broadcast would need to go at the exact same time. A broadcast is never 'being recieved'; but it can 'be recieved'. You can't expect when a broadcast comes, unless you use the same conditions and are lucky, which is useless, to broadcast and to expect a broadcast! This is absolutely useless, you can make it much simpler and most of the time it won't work! There is NO use AT ALL for this!

Unless you mean a block like this, this is a good idea,
<[broadcast v] was sent>
as it turns 'broadcast' into a continuous trigger.

Last edited by likegames (2012-05-31 10:38:39)


There are 10 types of people in this world: Those who understand trinary, those who don't, and those who think this is the same old signature.
Three lines! (and base three!)

Offline

 

#6 2012-06-05 13:54:22

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: New way to read broadcasts

I was saying

if (sample v) was received


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#7 2012-06-05 14:03:25

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: New way to read broadcasts

I would really enjoy a dropdown/text rather than dropdown, good idea, but the main idea has been requested about a thousand times  tongue

Offline

 

#8 2012-06-05 14:39:55

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: New way to read broadcasts

Oh.  Sorry.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#9 2012-06-07 03:43:00

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: New way to read broadcasts

I think one of the two following blocks will be better:

If <<last broadcast received>=[something]>
Do stuff
End
If <broadcast [something v] received in next (2) secs>
Do stuff
End

Last edited by joefarebrother (2012-06-07 03:43:33)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#10 2012-06-07 04:13:44

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: New way to read broadcasts

There are simple ways to circumvent this.


http://trinary.tk/images/signature_.php

Offline

 

Board footer