Scratch Silver III
Scratch Silver II
SCRATCH SILVER I
SCRATCH GOLD III
1 of 3

3.02 Set the stage

In this step, you will set the stage for your first gig and choose a rock star name.

Open the Drum star starter project. Scratch will open in another browser tab

The game starts in a bedroom like a DIY artist.

Click Choose a Backdrop and search for bedroom.

Choose: Select a bedroom and add it to your project. We chose bedroom 3.

In Scratch, you can add code to the Stage.

Click on your bedroom backdrop from the Stage pane and add this code:

The backdrop thumbnail in the stage pane.

Every musician needs to choose a rock star name.

variable is a way of storing numbers and/or text. Your rockstar name will be stored in a variable so it can be used at any time.

From the variables blocks menu, click the Make a Variable button.

Call your new variable name:

The New Variable pop up window with text input 'name'.

Notice: The new name variable appears on the Stage and can now be used in the Variable blocks.

At the start of the project, your rockstar name is unknown.

Add a block to set name to ???:

You can ask a question in Scratch, then use a variable to store the answer.

Click on the Sensing blocks menu and add an ask block to your code:

Set the name variable to the answer:

Change the way your variable looks on the Stage.

Right-click on the variable on the Stage and choose large readout:

Drag your variable to position it in top-right of the Stage:

Test: Run your project to make sure the variable starts as ??? then updates to your answer.

Now that you have tested that the variable changes to the answer, you can drag the last 2 blocks of code away from the rest of the script. This means you don’t have to type an answer every time you test your project:

×
×

Cart