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 Tir au but

Transcript

In this add-on, you will program the crowd to cheer if the batter hits the ball.

Scratch has two sound blocks: “play sound” and “play sound until done.”

When Scratch runs a “play sound until done” block, it plays the sound to the end before running the next block below it. When Scratch runs a “play sound” block, it starts playing the sound, then immediately runs the next blocks. It will stop playing the sound when it runs into a “play sound” block again.

To put your sound into a loop, use the “play sound until done” block. Whichever block you use, click the dropdown, and choose “cheer.” Consider where to place the “play sound” block to make the cheer happen when the batter hits the ball. Should it be inside the repeat loop or before or after it? Should it be inside the “if touching color red” block or before or after it? Keep tinkering and trying different things until you have something you like.

Computer scientists like you don’t always get things exactly right the first time. They use courage and persistence to keep trying and learning from their mistakes.

If you need help, ask a neighbor. If you still need help, ask a Host or Guru.

Here's the game plan: Use a “play sound” or “play sound until done” block to make the crowd cheer when the ball is hit.

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 !