arrow_back In the Big Leagues
In this add-on, you will program the pitcher or coach to tell a baseball story. This might include an explanation of how to play the game.
Think about the kinds of things a coach or pitcher might talk about. Is the batter the best in the land? Practicing for a big game? What inspired them to play?
Use “say” blocks from the "looks" menu to tell this story.
Then, program the baseball to wait until the sprites finish talking before it starts moving.
Place the “wait” block just under the “when flag clicked” block.
Add the seconds in all the “say” blocks to get the value for the “wait” block.
For this example, the pitcher says “I’ve been playing baseball since I was a little kid” for 2 seconds, then “My dream is to play for the Detroit Tigers” for 2 seconds then “I’ll pitch to you; hit the ball by clicking the bat” for 2 seconds. This total 2 + 2 + 2 is 6 so in this example the ball will wait for 6 seconds.
This video doesn’t go into too much detail so you grow as a computer scientist by challenging yourself to figure things out on your own. Use your mind and your friends as resources!
Here's the game plan: Make the sprites tell a story using “say” blocks. Make the baseball wait to move until the story is done.