A costume is one out of possibly many "frames" or alternate appearances of a sprite. Sprites can change their look to any of its costumes. They can be named, edited, created, and deleted, but every sprite must have at least one costume. One of the most common uses of costumes is to make an animation for a game or other project.
There are four main ways of getting a costume or background for a sprite or stage.
- Drawing one using the inbuilt Scratch Paint Editor, by clicking on the costume or background tab, and clicking the "paint" button
- Getting an image or multiple images that exist as files on the computer, either by clicking the "import" button under the costumes tab, or dragging in an image or images from an open folder. Dragging an animated .gif file from a folder into Scratch will split the gif into many costumes so the gif can be played using the Next costume block.
- Taking an image from a webcam, by clicking the "camera" button (added in 1.4)
- Right clicking on a sprite and selecting "grab screen region for new costume" which enables you to define an area of the Scratch client to become a new costume (this can not be done for the stage, as this will create a new sprite instead)
- Main article: Paint Editor
There are two different costume types: Bitmap, which uses pixels to create an image. There are 10 tools you can use to edit a costume in bitmap:
- The first one is the brush. The brush is used to make general shapes, and it is the basic costume-making tool.
- The second tool is the line. The line is for creating straight edges that are hard to create with the brush.
- The third is the rectangle tool (or press and hold shift while drawing for a square). It is a quicker way to draw a rectangle or square then drawing it out with the line or brush.
- The fourth is the oval tool (Again, press and hold shift for a circle). This tool creates a better circle or oval then the brush tool if you want a good circle.
- The fifth tool is text. You click on the place you want the text, and a text box will pop up. When you are done with your text, you click outside the text box to stamp it.
- The sixth tool is the fill with color tool. Click anywhere to fill that space with the selected color.
- The Seventh tool is the eraser. The eraser is like the brush, but instead of stamping color, it erases color.
- The eighth tool is select tool. You use it to move the selected space to a new position.
- The ninth is the select and duplicate tool. You select an item and press control (ctrl at the bottom left of your keyboard) and "C" keys at the same time, and then press control and "V" keys to duplicate it at the position you want.
- The last tool is the remove background/magic wand tool. You draw around the area you want to keep, and it removes the background.
And Vector, which uses two points to create a line. There are also 9 tools for the vector editor, but only reshape and select are different.
- To use the reshape tool, first select an item, then dots will appear around the shape at different places. You can move the dots around to create custom shapes, like a triangle from a square.
- With the select tool, you just have to click on an object to select it. Also, when you select an object, two tools pop up. they are the "Send back one layer" and the "Send forward one layer" tools. You use these to send an object beck or forwards one layer. When you select more than one object, One new tool will pop up. It is the "Group" Tool. You can can group objects together to move them all at once. When you select a grouped object, you can use the "Ungroup" tool to ungroup the object.
Clicking the "X" button towards the lower right of each costume will delete it, provided that it is not the only costume of the sprite. This cannot be undone.
There are four blocks that relate to costumes, which are as follows:
- The first block is used for the sprite to transfer its look between any of its costumes. The drop-down box shows all of the sprite's costumes, with more than one page if the count exceeds 33.
- The second block is mainly used in animation. A block that does the opposite has been suggested, but it can simply be done with the following code:
switch costume to ((costume #) - (1))
- The third block contains the number of the current costume being used. It can be read through other blocks, and specific actions can be taken.
- The fourth block contains two drop-down boxes. The first allows you to read a sprite's X Position, Y Position, direction, costume number, size, and volume; while it can also read the Stage's background number and volume.
This block can be read from the Stage and all sprites.
Example of the next costume/switch to costume()
To see the costumes of a sprite, click on the Costumes Tab. This will display a list of the costumes in the sprite, as well as open the paint editor.