concept green flag in category scratch

appears as: green flag
Hello Scratch!: Learn to program by making arcade games

This is an excerpt from Manning's book Hello Scratch!: Learn to program by making arcade games.

To check your program now that it is finished, click the green flag above the Stage. You should see the cat move slightly to the right. The Green Flag block tells the program to run. The blue Motion block tells Scratch what the sprite should do: move 10 steps.

The first block to meet is the When Flag Clicked block, in the Events block menu. Yes, you saw this block back in chapter 1, but now it’s time to talk about how important it is for all the scripts you’ll make in your games. This block, like the similar When Space Key Pressed block, tells the program the action that is required to get the program to run. It sets an “on” switch that the player can trigger (in this case, by clicking the green flag above the Stage) when they are ready to play the game. You’ll use it to create a small script that makes the sprite move 100 steps to the right, as shown in figure 3.1.

Figure 3.1. The cat moves 100 steps to the right each time the green flag above the Stage is clicked. At 100 spaces per click, he can cross the Stage in four clicks of the green flag.
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage