Page 5: Improving Your Game
Unit 1, Lab 1, Page 5
There’s always something more you can do to make a program better. On this page, you’ll improve your game by making Alonzo welcome the player when the green flag () is clicked.
- If your project is open and the script is still running, click the red stop sign, . If it isn’t open already, open your U1L1-ClickAlonzo project.
Clicking the green flag button in the top right corner of the window () starts all scripts that begin with the when green flag clicked
hat block.
Create a second script that makes Alonzo a welcome message when the green flag is clicked. (Alonzo might say, “Welcome to ‘Click Alonzo!’ Keep clicking me if you can!”)
Make that message disappear when the player clicks on Alonzo.
The say
block with an empty text in the white input slot will make the sprite say nothing.
Check that your app does everything you want:
- When the green flag is clicked, Alonzo should welcome the player.
- When Alonzo is clicked, the message should disappear, and Alonzo should move to a random spot on the stage, face the other way, and get more transparent.
- Alonzo should start to reappear (but shouldn’t face the other way) any time he moves without being clicked.