Skip to content

When people are running your program, you want them to understand how to play it.  You can help them learn to understand how you use your program by keeping things the same every time they run your program.

Why

Here is the thing, when you run a program, if you do not start the same way every time, the program will not behave the same.  It will seem unpredictable. Your sprites will not start in the same place.  People will not understand how to use your program. This may not be what you want.

What

In this lesson, you are going to learn one way to tell the computer how to begin your program so different people see it the same way each time it is run.

How

One way to do this is to use an event code block call the When Green Flag Clicked  block.

The Lesson

scratch coding event blocks

The image above shows all of the event blocks in Scratch. The green flag event block is the first block we will learn about in this course. Notice that the shape of event blocks only allows you to attach code blocks to the bottom side.  What this mean is that event blocks start a set of instructions. Blocks attached to event blocks run in the order from top to bottom.

They are called event blocks because they react to events.  In the case of the green flag event, it reacts to the green flag run button being pressed.

We always start our programs by clicking the green flag run button.  This means that green flag event is triggered always at the very beginning. You can use this to setup where your sprites start and what they are doing at the beginning of your projects.

Challenge

Get the Coding Challenge Worksheet for Lesson 6

Practice coding, signup for the free challenge worksheet.

    We respect your privacy. Unsubscribe at any time.

    Review

    Congratulations, if you have successfully completed the challenge.

    In this lesson you learned about the green flag event block and how it can be used to setup your sprites at the beginning of a program.

    Next Lesson

    In the next lesson you will how to change the backdrops in your project.

    Ask a Question

    Need help or have a question?

      Unsubscribe at any time.