Pens are a category of blocks we can use to draw on the stage. This recipe will explore using the pen to draw a square on the stage.
This is a new category we haven't used before in the block palette:
All you need to do to get this recipe started is open a new Scratch file. We'll be using the default sprite. It may also be fun to add the grid background to the stage.
Follow these steps to draw a square on the stage:
Drag a green-flag block in to the script area.
Drag a clear block from the Pen category.
From the Motion category, drag a go to x: () y: () block. Set both values to
0
.Drag a point in direction () block in to the sequence. Change the value to
0
. You'll now have the following:Drag a point in direction () block and change the value to
90
.Next, place a set pen color to () block from the Pen blocks. Click on the color to select a color you like.