Looks Blocks
Changing sprite costumes and adding bubble dialogues
Definition
Looks blocks control a sprite's appearance, enabling costume changes, speech bubbles, scale modifications, and color filter effects. Key concepts include Hat Block.
Think of Looks Blocks as:
Just as an actor changes costume or walks across the theater grid on cue, Looks Blocks dictates sprite behavior.
Real-Life Example
Just as you coordinate actions in real life, Looks Blocks works by structuring logic commands in sequence:
- 1 Register the trigger event block.
- 2 Run calculations or movements within a continuous control block.
- 3 Update values or graphics on the stage viewport.
Key Highlights:
- Trigger event
- Logic evaluation
- Visual update
Interactive Diagram
Launch the interactive diagram to see this in action.
Open Interactive DiagramThe interactive diagram for this chapter demonstrates Looks Blocks. It shows looks blocks (say, think, show, hide, switch costume, change size) affecting a sprite appearance.
What to explore:
- click looks blocks to see their effect; switch costumes; change sprite size; apply graphic effects
- looks blocks control how a sprite appears — its costume, size, visibility, and speech bubbles
Introduction
In the real world, things look different depending on their color, size, and visibility. In Scratch, Looks Blocks give you the power to control exactly how your sprites and stage appear. Want a character to fade away? Use a Looks block. Need to change the background for a new level? Looks Blocks have you covered. These blocks are the visual toolkit for your digital creations.
Looks Blocks are organized into three categories: those that control a sprite's appearance (costume changes, size, visibility, graphic effects), those that show text (the 'say' and 'think' speech bubbles), and those that control the stage (backdrop changes). Together, they give you complete control over the visual experience of your project.
In this chapter, you will learn how to use Looks Blocks to change costumes, adjust size, show and hide sprites, apply graphic effects like color and ghost (transparency), and use speech bubbles to make your characters communicate. By the end, you will be able to create visually dynamic projects that change and react as they run.
How It Works
The 'switch costume to ()' block changes a sprite's visual appearance to a selected costume. You can also use 'next costume' to cycle to the next costume in the list. Switching costumes rapidly creates animation effects — for example, alternating between two costumes of a bird with wings up and wings down makes it look like the bird is flying. The 'costume number' reporter block tells you which costume is currently showing.
The 'show' and 'hide' blocks control whether a sprite is visible on the stage. A hidden sprite still exists and can still run scripts and detect collisions — it is just not drawn on the screen. This is useful for sprites that should appear later (like an enemy spawning) or for background calculations. The 'set size to ()%' and 'change size by ()' blocks control sprite scale.
Household Object Analogy
Think of Looks Blocks like a movie director's toolkit. 'Switch costume' is like changing an actor's outfit. 'Say' is like giving the actor a line of dialogue. 'Set size' is like zooming the camera in or out. 'Show/Hide' is like telling an actor to enter or leave the stage. 'Graphic effects' are like camera filters and special effects. The director uses all these tools to create the visual story.
Deeper Dive
The 'say () for () seconds' block creates a speech bubble above the sprite that displays text for a set duration, then disappears. The 'think () for () seconds' block creates a thought bubble (with bubbles instead of a solid tail) that shows a character's thoughts. These blocks can display variables or computed values, making them useful for debugging — you can have a sprite 'say' the current value of a variable to see what it is.
Graphic effects in Scratch include color (changes the hue), fisheye (bulges the sprite), whirl (twists the sprite), pixelate (makes it blocky), mosaic (creates mirror tiles), brightness (makes it lighter or darker), and ghost (makes it transparent). The 'set [effect] to (0)' block sets the effect to a specific value (0-100 for most effects, 0-200 for color). The 'change [effect] by ()' block gradually increases or decreases an effect, which is how you create fade-in (ghost effect decreasing) or fade-out (ghost effect increasing) animations.
Multiple graphic effects can be applied simultaneously. They stack cumulatively, so you can have a sprite that is both transparent (ghost effect) and color-shifted (color effect). The 'clear graphic effects' block resets all effects to their default values (0). This is important for resetting sprites when restarting a game or resetting to a neutral state.
Key Insight
The 'say' and 'think' blocks can display any text, including numbers and variable values. This makes them a powerful debugging tool — you can have a sprite 'say' the value of a variable to see if it is changing correctly as your program runs.
Advanced
The 'set layer to [front/back]' and 'go [forward/backward] (1) layers' blocks control the z-order (depth) of sprites. When sprites overlap, the one with the highest layer number appears on top. The stage is layer 0, and sprites occupy layers 1 and above. The 'go to front' block moves a sprite to the highest layer, ensuring it appears on top of all other sprites. This is critical for UI elements, score displays, and the player character.
The 'size' property is relative to the sprite's original costume size. A size of 100% is the original size as drawn in the costume editor. A sprite can be scaled up to 1000% (10x) and down to 1% (very tiny). Size changes do not affect collision detection in some Sensing Block — the 'touching' block uses the actual costume shape, not just the bounding box, but size changes may not perfectly scale the collision area.
Costume centering is an important detail. Each costume has a center point (shown as a crosshair in the costume editor) that determines where the sprite's position coordinates refer to. By default, the center is at the middle of the costume. If you draw a character and the center point is at its feet, then setting the sprite's position to y=0 will put the feet at y=0 instead of the middle. Adjusting the center point makes positioning much more intuitive.
Vocabulary Table
| Term | Definition |
|---|---|
| Looks Blocks | The primary technological concept explaining how components interact within the context of Scratch Programming. |
| Coordinate Grid | The X and Y plane representing the Stage layout coordinates. |
| Hat Block | A block with a rounded top that registers events to launch scripts. |
| Sensing Block | A block that checks for collisions, touch parameters, or mouse pointer coordinates. |
Fun Facts
The ghost effect at 100% makes a sprite completely invisible. At 0%, it is fully visible. Values between create partial transparency, which can be used for glass, ghosts, or fade effects.
The color effect cycles through all hues as its value goes from 0 to 200. At 0, the sprite looks normal. At 100, the colors are shifted. At 200, it returns to normal (full cycle).
The 'say' block was inspired by speech bubbles in comic books and graphic novels.
Graphic effects only affect the visual appearance of a sprite — they do not change collision detection. A sprite with 100% ghost effect (invisible) can still trigger 'touching' blocks.
You can apply graphic effects to the stage as well as sprites, allowing for full-screen effects like color shifts or pixelation.
Common Misconceptions
Misconception: 'Hide' makes a sprite stop running its scripts.
Truth: Hidden sprites continue to run all their scripts normally. They just are not visible on the stage.
Misconception: The 'say' block only works with text, not numbers.
Truth: The 'say' block can display numbers, variables, and mathematical expressions. For example, 'say (score)' will display the current value of the score variable.
Misconception: Graphic effects are permanent changes to the costume.
Truth: Graphic effects are temporary visual filters. They reset when the project stops, and you can use 'clear graphic effects' to remove them anytime.
Misconception: Changing size changes the sprite's costume permanently.
Truth: Size changes are temporary and reset when the project restarts. The original costume in the editor remains unchanged.
Knowledge Check
1. What is the main role of Looks Blocks?
Answer: To orchestrate behaviors and controls visually
2. Which block shape starts a script stack in Scratch?
Answer: Hat block (curved top)
3. What is the maximum X coordinate limit on the stage?
Answer: 240
