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 – creating lists to store multiple values


Before we start the first exercise, create a new project with exactly two sprites. The first sprite will be the seeker. The second sprite will be the teller. Choose any sprites you want and edit them in any way you wish. My seeker will be Pico and my teller will be a Wizard, both from Scratch's image library. The seeker will ask the questions and the teller will provide the fortune or the answers to the seeker's questions. As you import your sprites, name them seeker and teller because that is how I'll refer to them throughout the rest of the chapter.

In order to have a successful fortune telling session, we need two things: a question and an answer. Let's start by defining some questions and answers as given in the following steps:

  1. Select the seeker from the list of sprites.

  2. From the Data palette, click on the Make a List button.

  3. In the list name dialog box, type in questions and select For all sprites.

  4. Click on OK to create the list...