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 to the first.
This block is mainly used in animation scripts, in which a sprite will progress through its costumes as with stop motion animation. The Wait () Secs block is often used along with it to improve the animation speed.
An example script is below:
when gf clicked repeat (10) next costume wait (0.05) secs end
This contains the costume change and the animation delay.
- 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 #) + (1))
To get the effect of the nonexistent
previous costume :: looks block, the addition can be changed to subtraction, like this:
switch costume to ((costume #) - (1))
Many users have made suggestions about removing this block, insisting that it does not make any sense without a Previous Costume block. 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.
- Letsgopitt (9/3/2015). "We should get rid of the henceforth redundant “Next Costume” block. This would prevent confusion/suggesting for a “Previous Costume” block." topic:96594
- Jonathanpb. (2/12/2009). "Since there's [next costume], why not have [previous costume]?" ar-topic:26735
- 18yuj. (3/3/2013). "This is mainly because it definitely helps save time and makes the script area less congested and stuff." ar-post:1516143
- Paddle2See. (12/3/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
Say () for () Secs • Say () • Think () for () Secs • Think () • Switch Costume to () • Next Costume • Switch Backdrop to () Next Backdrop • Change Size by () • Set Size to ()% • Change () Effect by () • Set () Effect to () • Clear Graphic Effects • Show • Hide • Go to () Layer • Go () () Layers • Costume # • Backdrop Number • Size
|For the Stage|