This add-on will teach you about a new way that computer scientists store informationin computers, and at the end, your athlete will say random things that you program.
To make the athlete randomly say different things, first create a place to store phrasesto choose from. Computer scientists often store this kind of information in a list.
You already used variables in this club. But, a variable only stores one piece of information,such as a single number, sentence, or true/false value. Lists work like variables, except theyhold many different pieces of information, instead of just one.
To create a list, select “make a list” from the data menu. Name the list somethinglike “Funky Phrases” because it will contain different phrases the athlete will say. Then,click “OK.” The list will pop up on the stage. Next, addphrases for the athlete to say. To add a new phrase to the list, either click the “plus”button, or type the phrase into the “add” block in the data menu, and click to add itto the list. Add as many funky phrases to the list as you want. This example uses thingslike, “CS First Sports was really fun,” “I learned how to create with computers,”and “My teammates helped me out a bunch.” Next, program the athlete to say the phrasesyou added. Drag out a “say” block, then from the “data” menu, drag out the “item”block. This block picks one item at a time from a list. Snap this block into the “say”block. Click the “say” block to test this. Itworks, but the athlete only says the first item on the list. Click the dropdown in the“item” block. The number “1” is selected. That means the “item” block only everlooks at the first phrase in the list, so when you click the “say” block, that’sthe phase the athlete says. To make the athlete say a random phrase from the list, select“random” from the dropdown menu. Finally, choose when to start off your newcode. You have a couple of options: either snap the event to the bottom of the dialogue,or snap a new event block above the “say” block. The example uses a “when this spriteclicked” event to make the athlete say an item from the list every time it is clicked.
Here’s the game plan: Make a list.
Fill the list with fun phrases. Choose an event or a place to insert the “say”block that will pick a random item from the list to say.
Choose an Add-On
Make the user answer an interview question!
Show off the athlete's coolest move of the game.
Prompt your athlete to say random things!
Program a sprite to pop onto the stage and interrupt the interview.
Gatorade Shower (Challenge)
Dump Gatorade on your athlete's head.
Have fans take pictures of the victorious athlete.