Show
2.0 Show.png
Category Looks
Type Stack

The Show block is a Looks block and a Stack block. If the block's sprite is hidden, it will show the sprite — if the sprite is already showing, nothing will change.

This block is one of the simplest and most commonly used Looks blocks.

Example Uses

This block is widely used, mainly in preparing scenes for a Scratch project. Some common uses are:

  • Preparing a scene, as stated above
  • Showing a sprite in front of an object to cover it
  • Simply showing a sprite (hide and seek, for example)
  • Showing a bullet before it gets fired (see Shooting Projectiles)
  • Animation scripts

Workaround

As an alternative to showing and hiding sprites, one can replicate the same effect with the ghost effect. Setting the ghost effect value to 100 will "hide" a sprite, though actually making it fully transparent. Setting the ghost effect to 0 will "show" the sprite and revive its opacity. This can be shown in the following script:

when gf clicked
set [ghost v] effect to (100) //hide
wait (1) secs
set [ghost v] effect to (0) //show

Ghost effect may be a positive alternative to use for hiding and showing if fading is a necessity. Otherwise, using the "show" and "hide" blocks are typically used and may result in a performance benefit when a sprite is hidden due to the CPU not having to render the sprite.

Note Note: This workaround will not keep the sprite hidden when the stop sign is clicked

See Also