(Redirected from Stamp)

Stamp
stamp
Category Pen
Type Stack

The Stamp block is a Pen block and a stack block. When used in a script, the sprite will produce a bitmap image of itself which is stamped onto the stage. (Because it is merely a picture of the sprite and not a sprite itself, it cannot be programmed.) Like other Pen blocks, the Stamp block will not draw over sprites. The erase all block removes all stamped images.

History

Before Scratch 2.0, the ghost effect did not apply to stamped images. In the 2.0 prealpha from Scratch Day 2011, there was a Stamp Transparent () block allowing sprites to produce transparent stamped images. This block was removed as the ghost effect now works with stamping.

Example Uses

This block is commonly used and is vital to many projects:

  • Having multiple images of a sprite on the screen
when gf clicked
change y by (10)
stamp
change x by (20)
stamp
  • Covering up part of the stage
  • Creating the illusion of multiple sprite movement in One Sprite One Script Projects
  • Rendering a random world
  • In some types of drawing projects

Project Types

Workaround

One workaround is to create a clone of a sprite that does nothing:

create clone of [myself v]

However, these clones could eat up memory and there is a limit of 300 clones whilst a sprite may stamp itself any number of times. Also, clones may appear in front of other sprites, and will listen to the same broadcasts as the original sprite.

To be able to keep stamping one could delete old clones when one wants to stamp but there are too many clones. To allow stamped images to ignore broadcasts one could use a local variable to distinguish stamped images.

Examples

See Also