Pen Down
2.0 Pen Down.png
Category Pen
Type Stack
The Pen Down block is a Pen block and a Stack block. The block will make its sprite continuously pen a trail wherever it moves (until the Pen Up block is used). The color, width, and shade of the trail can be changed with other independent blocks.

Example Uses

This block is used most frequently in projects that require art to be drawn. When a sprite will continuously pen a trail (for example, a project where the goal is to fill the whole screen), most projects will use this block. This block is also commonly used in one sprite one script one costume projects.

Some common uses for the Pen Down block include:

when I receive [Draw string v]
pen down
repeat (10)
change x by (5)
end
pen up
  • Drawing patterns on the screen
pen down
repeat (50)
set x to (pick random (240) to (-240))
set y to (pick random (480) to (-480))
end
pen up
  • Freedrawing with the mouse
when gf clicked
clear
go to [mouse-pointer v]
if <mouse down?> then
pen down
else
pen up
end
go to x: (0) y: (0)
set pen color to [#7d7d7d]
set pen size to (20)
pen down
change x by (150)
pen up
go to x: (5) y: (0)
set pen color to [#00d5fa]
set pen size to (12)
pen down
change x by (140)
pen up
Note Note: All these examples include the Pen Up block; they often work together.

See Also