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 Ligue nationale

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.

Choisir une extension
Célébration
Programme une célébration lorsque le frappeur réalise une moyenne parfaite.
Effet d’optique
Donne à la balle une apparence plus réaliste lorsqu'elle s'approche ou s'éloigne des buts.
Record
Indique au frappeur s'il a battu le record enregistré jusqu'ici.
Tir au but
Programme le son des acclamations du public.
Ligue nationale
Fais raconter une histoire par le lanceur avant le début du jeu.
Simuler le mouvement
Anime le lanceur afin qu'il ou elle donne l'impression de se déplacer.
arrow_backward Retour
Suivant arrow_forward
Instructions
  1. Choisis une extension, et clique sur "Regarder" pour découvrir comment personnaliser ton projet.
  2. Quand tu as fini, reviens à la fenêtre des extensions et essaies-en une autre !