O'Reilly logo

Scratch by Example: Programming for All Ages by Eduardo A. Vlieg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Eduardo A. Vlieg 2016
Eduardo A. VliegScratch by Example10.1007/978-1-4842-1946-1_11

11. Broadcast Interaction

Eduardo A. Vlieg
(1)
Curacao, Curaçao
 
By now, you’ve learned several ways to activate a script besides simply clicking it in the scripts area. For example, you can use hat blocks in the Events block category to instruct a script to start when the user clicks the green flag or presses the space bar. But what if you could activate one script automatically from inside another script with no user clicking or key presses required? That’s what this chapter teaches you how to do: use a block in one script to broadcast an instruction to another script, telling it to activate.
If you have two sprites in a project, for example, you can create one ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required