Next Costume
next costume
Category Looks
Type Stack

The Next Costume block is a Looks block and a stack block. The block changes its sprite's costume to the next one in the costumes pane, but if the current costume is the last in the list, the block will loop back to the first costume in the list.

The stage has its own version called the Next Backdrop block.

Example Uses

This block is mainly used in animation scripts, in which a sprite will progress through its costumes as with stop motion animation. The Wait () Seconds block is often used in conjunction with it to improve the speed of the animation.

An example script is below:

when gf clicked
repeat (10)
   next costume
   wait (0.05) seconds
end

This contains the costume change and the animation delay.

Workaround

Main article: List of Block Workarounds

Along with the Switch Costume to () block, it is one of the most commonly used Looks blocks. However, this block is technically unnecessary due to the fact that the following code can be used:

switch costume to ((costume [number v]) + (1))

But, even if it is technically unnecessary, it will reduce the time of making the block. See Removal.

To get the effect of the nonexistent previous costume:: looks block, the addition can be changed to subtraction, like this:

switch costume to ((costume [number v]) - (1))

Removal

Many users have made suggestions about removing this block, insisting that it does not make any sense without a Previous Costume block.[1] However, others have disagreed, saying that it saves time, is useful for animations, makes the scripting area less cluttered, and helps new Scratchers be less confused.[2][3]

A Scratch Team member made a comment on it[4] and suggested that they might, in the future, remove the block if it makes sense.

References

  1. Letsgopitt. (08/03/2015). "We should get rid of the henceforth redundant “Next Costume” block. This would prevent confusion/suggesting for a “Previous Costume” block" topic:96594
  2. Jonathanpb. (02/12/2009). "Since there's [next costume], why not have [previous costume]?" ar-topic:26735
  3. 18yuj. (03/03/2013). "This is mainly because it definitely helps save time and makes the script area less congested and stuff." ar-post:1516143
  4. Paddle2See. (11/03/2015). "Perhaps we should reshape this suggestion to “Add Next/Previous Costume” to “Switch to Costumer”[sic] so as to be consistent with backdrops?" post:842942

See Also

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