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

#1 2012-03-10 09:20:05

funelephant
Scratcher
Registered: 2010-07-02
Posts: 1000+

What is the difference?

What is the difference between

broadcast [message v]
and

broadcast [message v] and wait
I know what broadcasts do, but what is the difference?


nicki begs to differ
http://24.media.tumblr.com/ab0e6e8fd347c5e39c2821bcab9d16e6/tumblr_mgu35sui1L1rfb7aqo2_500.gif

Offline

 

#2 2012-03-10 09:33:37

PullJosh
Scratcher
Registered: 2011-08-01
Posts: 500+

Re: What is the difference?

broadcast [message v]
Broadcasts the message and moves on.

broadcast [message v] and wait
, on the other hand, broadcasts and waits for all the scripts that run from the broadcast (using when I receive).

So this:

when gf clicked
wait (1) secs
broadcast [message v] and wait
play sound [beep v]

when I receive [message v]
wait (1) secs
Is the same as

when gf clicked
wait (2) secs
play sound [beep v]

Last edited by PullJosh (2012-03-10 09:34:22)


http://www.blocks.scratchr.org/API.php?action=text&string=I'm_on_vacation!&xpos=155&ypos=90&font_size=30&bgimage=http://imageshack.us/a/img339/7215/sspeechsigapiforwords.png

Offline

 

#3 2012-03-11 08:43:14

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: What is the difference?

If you use BYOB, it's like run[] vs. launch[].


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer