Page 98 - PlugGPT_V2.0_C5_Flipbook
P. 98
Pen Block
Pen blocks in Scratch allow a Sprite to draw shapes and plot coloured pixels on
the screen. These blocks are colour-coded as dark green and are used to draw the
footprints of the Sprite.
Blocks Functions
pen up This block puts up Sprite’s pen up, so that it will not
draw as it moves on the screen.
pen down This block puts Sprite’s pen down, so that it will draw
as it moves on the screen.
set pen color to This block changes pen colour based on your choice
from colour picker.
This block keeps the pen coloured but lighten
change pen shade by 10 or darkens the shade of that colour by the value
mentioned. For light shades use negative values and
or dark shades use positive values.
This block duplicates the Sprite’s image onto the
stamp
stage.
DRAWING A SQUARE
To draw a square, the script will be as follows:
Step 1 Drag the when clicked block from Events block menu.
Step 2 Drag the clear block from Pen block menu. This will clear any previously
drawn image, if any.
96 Premium Edition-V

