Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By : Michael Badger
Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By: Michael Badger

Overview of this book

Table of Contents (18 chapters)
Scratch 2.0 Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – asking a question


Our task is to make the seeker have a conversation with the teller and ultimately, ask a question. Select the seeker sprite, and let's begin:

  1. First, clean the clutter from the stage. Right-click on each of the list monitors and select hide.

  2. Let's stitch together some dialog between the two sprites. From the Events palette, add the when this sprite clicked block to the scripts area.

  3. Attach a say () for () secs block and change the text value to a pleasant introductory sentence such as Hi, wise teller. Do you have my fortune?.

  4. Add a broadcast () block, and create a new message named intro (short for introduction) as a way to signal the teller that the seeker is ready, as shown in the following screenshot:

  5. For the teller, add a when I receive (intro) block to the scripts area, and attach an ask () and wait block from the Sensing palette. Replace the text value of the ask block with something that prompts the player to ask a question on behalf of the seeker, such...