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, size, and transparency of the trail can be changed with other blocks.
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:
- Drawing strings in animations
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
- Drawing with the mouse
when gf clicked erase all forever go to [mouse-pointer v] if <mouse down?> then pen down else pen up end end
- Drawing bars with the pen in one sprite one script projects
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:||All these examples include the Pen Up block as well; they often work together.|