The play sound blocks in the short script examples from previous labs played in order: one block and then the next until there were no more blocks to run. But we did see that what we actually heard depended on whether we waited until one sound was done playing before starting the next or not. (So what use is the non-until done version of the play sound block? If different sprites play different sounds at once, you can hear them both overlapping.)

The broadcast block allows us to control which block is run next through message passing. Try to make these scripts in Snap!.

Script of Alonzo for the Play Script of the Duck for the Play

A note about style: You will notice that we chose to name the messages that were broadcast so that it would help us keep track of what we were doing and what messages we were sending. We recommend that you do this in your projects!