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. All costumes have 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 #)

Related Blocks

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

  • 2.0 Costume Number.png — The stage monitor and reporter block of the costume # value
  • 2.0 Switch Costume to ().png — Switches to a certain costume, therefore changing the costume # value
  • 2.0 Next Costume.png — Switches to the next available costume by changing the costume # by 1

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