Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
This article is about the block from Scratch 2.0. For the block in Scratch 3.0, see Costume () (block). For the value this block reports, see Costume Number (value).
The correct title of this article is Costume # (block). The Scratch Wiki uses this different title because of technical restrictions.
Costume #
costume #
Category Looks
Type Reporter
Introduced in 1.2
Removed in 3.0

The Costume # block was a Looks Block and a Reporter Block. The block returned its Sprite's current costume number. Since the block was for both sprites and the stage, and sprites have costumes while the stage has backgrounds, it was accompanied by the background # block. Neither version could be used as a substitute for the other version. If attempted, the script would not run.

In Scratch 3.0, the block was removed in favor of a costume () block which could return either the costume's number or its name.

This block can be displayed as a Stage Monitor.

Example Uses

As this block held the costume number of sprites, it was widely used when something must happen if a sprite is at a specific costume. Some common uses were:

  • Stopping the project once a health sprite reaches the costume for zero health
if <(costume #) = []> then//Zero health costume number goes here.
stop [all v]
end
  • Checking if a sprite is at its last costume
if <(costume #) = []> then//Last costume number goes here.
. . .
end

Workaround

Main article: List of Block Workarounds

This block can be replicated using the block that replaced it:

(costume [number v])

It can also be replicated by using the () of () Sensing block, setting the Sprite parameter to itself either via JSON editing or via another sprite.

([costume # v] of (wanted sprite v))

See Also