Chapter 8. Chatting with a Fortune Teller
In the Breakout game we created in the previous chapters, we learned how easy it is to create projects that keep track of the changing values by using variables. However, variables have a limitation in they store only one value at a time. In this chapter, we're going to create a random fortune-spewing teller, which will require the sprites to have access to a list of multiple values at one time.
Welcome to lists. In Scratch, a list feature allows us to associate one list with multiple items or values in almost the same way we create a list before going to the grocery store. We can think of the items in the list as variables. Each list item can be changed, removed, or added to.
In this chapter, we will take a trip to the fortune teller to demonstrate lists, and I am sure you'll learn how to:
- Store and retrieve information in lists
- Prompt the player for project inputs, check for errors, and identify patterns with the mod block
- Use...