© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.