© Eduardo A. Vlieg 2016

Eduardo A. Vlieg, Scratch by Example, 10.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 ...

Get Scratch by Example: Programming for All Ages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.