Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back In the Big Leagues

Transcript

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.

Choose an Add-On
Celebration
Program a celebration for when the batter achieves a perfect batting average.
Over the Plate
Make the baseball look more realistic as it approaches or moves away from the plate.
High Score
Tell the batter if it has beaten the best batting average so far.
Out of this Ballpark
Program the sound of a cheering crowd.
In the Big Leagues
Make the pitcher tell a story before the game starts.
Going through the Motions
Animate the pitcher so it looks like he or she is moving.
arrow_backward Back
Next arrow_forward
Instructions
  1. Choose an add-on and click "Watch" to learn how to customize your project.
  2. When you finish, come back to the add-ons screen, and try another add-on!