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 ():: pen 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
repeat (a)
change y by (360)
change x by (5)
stamp
change y by (-360)

Project Types

Workaround

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

create clone of (myself v)

However, these clones can eat up memory and there is a limit of 300 clones while 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.

See Also

External Links

Cookies help us deliver our services. By using our services, you agree to our use of cookies.