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

#1 2012-05-09 21:28:44

SalemFox
New Scratcher
Registered: 2011-12-05
Posts: 10

recieve broadcasts in 'If' blocks

Honestly i believe this will make things much easier on some people.
like that down there

forever if <*recieved message*>
Do this thing
it would really help from making ALOT of scripts and smaller scripts just to make one simple action.
not to mention it will also help getting around that glitch where some sprites will Completly disregard some broadcast events and will only work if you somehow make it into an If event and add it to an already working script.

Offline

 

#2 2012-05-12 10:46:26

benjamin2
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: recieve broadcasts in 'If' blocks

This has been suggested many, many times before and I think it would be convienient. However, with a simple two block script for each received message, there is a workaround.

Example:

when i receive [message]
set [variable v] to (1)
when gf clicked
wait (0.1) secs
wait until <(variable) = (1)>
say (message received!) for (1) secs
Note: the wait 0.1 secs block is only neccesary for larger projects, it ensures the project resets correctly.


http://i.imgur.com/gp6tZ.gif

Offline

 

#3 2012-05-12 11:14:59

CatPerson
Scratcher
Registered: 2011-12-17
Posts: 1000+

Re: recieve broadcasts in 'If' blocks

I support


http://nyopoliticker.files.wordpress.com/2012/02/in_dog_we_trust_rusty.jpghttps://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSrxH2RAmte9adghivuoOhgklIlUcZUFuCAA0wFufFq-NWyZWg5http://www.buttonsonline.com/2012/obama/BO-rallysign-104.gif

Offline

 

#4 2012-05-12 12:50:41

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

Re: recieve broadcasts in 'If' blocks

Nope. Broadcasts are EVENTS, not TRUE/FALSE VALUES. This means they START things and you can't check WHEN they happen because the take 1 MILLISECOND so it would only be true for that long.

However, I DO support a

 (most recent broadcast received) 
block because THAT makes sense.


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

 

#5 2012-05-12 13:18:41

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

Re: recieve broadcasts in 'If' blocks

The other version that would make sense is "wait for [broadcast]".


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

 

#6 2012-05-12 19:27:57

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

Re: recieve broadcasts in 'If' blocks

It's already been suggested.


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

Offline

 

Board footer