The Pen Up block is a Pen block and a stack block. If a sprite is currently using the pen because of the Pen Down block, the block will cause the sprite to stop drawing a trail. (Otherwise it has no effect.)
This block is only used for a small number of circumstances, but it still can have much effect when used. Its most popular use is to raise a lowered pencil (or pen, paintbrush, etc.) from the screen in a drawing project.
Some common uses for the Pen Up block:
- Helping draw strings in animations
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 (-180) to (180)) end pen up
- Penning bars in One Sprite One Script Projects
go to x: (0) y: (0) set pen color to [#CCCCCC] set pen size to (20) pen down change x by (150) pen up go to x: (5) y: (0) set pen color to [#5555FF] set pen size to (12) pen down change x by (140) pen up
|Note:||All these examples include the Pen Down block as well; they often work together.|
There is no direct workaround for this block, since it is a primitive function of Scratch. However, you can set the pen color to the background color, so that the pen has no effect. It only works on uniformly colored backgrounds.