The correct title of this article is Costume # (value). The Scratch Wiki uses this different title because of technical restrictions.

The Costume # (or "backdrop #" for the stage) is a local value which is set to the current costume or backdrop of the sprite (or stage) that it is specific to. Every costume has both a name and number identifying their position in the costumes pane in the Paint Editor. The costume # value resembles the position of order the costume is in. For example, the costume at the top of the costumes pane has a value of 1 while the one below it is 2. The values are completely separate from the costume names, and often naming costumes numbers can confuse Scratch with the name and costume # value.

The Costume #s, circled here, are shown next to the thumbnails of the costumes they each belong to.

There is a block that reports this value for each sprite; therefore a variable can be set to a costume's number. For example:

when gf clicked
forever
   set [variable v] to (costume [number v])

Related Blocks

The following blocks can be used in conjunction with this value:

Example Uses

This value can be used in a number of ways:

  • Reporting what costume a sprite is on
  • Doing an action if the costume is a certain number
  • Detecting if a switch is on or off based on its appearance

See Also

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