Scratch 3 Programming Playground by Al Sweigart

Scratch 3 Programming Playground by Al Sweigart

Author:Al Sweigart [Al Sweigart]
Language: eng
Format: epub, pdf
Publisher: No Starch Press
Published: 2021-01-18T16:00:00+00:00


Make “You Win” and “Game Over” Messages

You need two more sprites for this game, but they won’t appear until the game ends. I created mine with the Paint Editor’s Text tool. If the player breaks all the Brick clones, the program displays the You Win sprite. If the tennis ball gets past the paddle, the program displays the Game Over sprite.

7. Modify the Tennis Ball Sprite’s Code

When the Tennis Ball sprite gets past the Paddle sprite—that is, when the Tennis Ball sprite’s y position is less than -140—the game is over. Once the game ends, the Tennis Ball sprite should broadcast a game over message. Add the following code to the Tennis Ball sprite.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.