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:
- Select the seeker from the list of sprites.
- From the Data palette, click on the Make a List button.
- In the list name dialog box, type in
questions
and select For all sprites. - Click...