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.
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|