- 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.
when gf clicked forever set [variable v] to (costume #)
The following blocks can be used in conjunction with this value:
(costume #)— The stage monitor and reporter block of the costume # value
switch costume to — Switches to a certain costume, therefore changing the costume # value
next costume— Switches to the next available costume by changing the costume # by 1
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