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

1.03 Pico says Hello

A sprite can have code, costumes, and sounds to change the way that it looks and what it does.

Add code blocks to make Pico emote with words and sound when the sprite is clicked.

The Pico sprite saying, "Hello!"

Emotes are a way of showing the personality of a character in a game. They can use speech, sounds, movement, and graphic effects, just like in Scratch. Do you play any games that use emotes?

Use the say block

Open the Looks blocks menu.

Click on a say Hello! for 2 seconds block.

The 'say Hello! for 2 seconds' block glowing with a yellow outline.

The Pico sprite will show a speech bubble for two seconds.

The Pico sprite with "Hello!" in a speech bubble.

Tip: Code blocks in Scratch glow with a yellow outline when they are running.

Drag the say Hello! for 2 seconds block to the Code area. Click on it again.

Dragging the 'say' block to the Code area and clicking on it to run it.
The 'say' block has been dragged to the Code area. The code block glows with a yellow outline.

Make Pico talk when clicked (or tapped)

Drag a when this sprite clicked block from the Events blocks menu and connect it to the top of your say block in the Code area. The blocks will snap together.

An animation of the blocks snapping together. When Pico is clicked on, they say "Hello!" for two seconds.
The Pico sprite.

Code comments

You will see comments in code examples. You don’t need to add the comments when you add code to your project.

If you have time when you have finished your project, it is a good idea to add comments to your code so that it is easier to understand later. To add a comment, right-click (or on a tablet, tap and hold) on a block in the Code area and choose Add Comment.

The pop-up menu that appears when you right-click on a block. 'Add Comment' is selected.

Test

Test: Click on the Pico sprite on the Stage and check that the speech bubble appears for two seconds. It is important to test your code to make sure that it does what you expect.

You have already saved your project and given it a name. Scratch will now automatically save for you.

You can still click save if you like, just to make sure.

×
×

Cart