From Test-Scratch-Wiki
Pen Up | |
Category | Pen |
Type | Stack |
The Pen Up block is a Pen block and a Stack block. If a sprite is currently using the pen feature because of the Pen Down block, the block will stop it from continuing. If the pen feature is not being used, the block will have no effect.
Example Uses
This block is only used for a small amount 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; they often work together. |
Workaround
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.