Star Student Builder logoStar Student Builder
← Scratch projects

🧱 What every block does

The blocks you will actually use, grouped the way Scratch groups them and coloured the way Scratch colours them. Keep this page open beside the editor.

Motion

Moving and turning a sprite

move 10 stepsgoes forward in whatever direction it is pointing
turn 15 degreesrotates, clockwise or anticlockwise
go to x: y:jumps to an exact spot
glide 1 secs to x: y:slides there smoothly β€” the difference between a jump and an animation
if on edge, bounceturns around at the wall
point in direction 9090 is right, βˆ’90 is left, 0 is up

Looks

Costumes, size, colour and speech

say Hello! for 2 secsa speech bubble
switch costume tochanges the drawing β€” two costumes swapped quickly is animation
next costumethe simplest animation block there is
change size by 10grows or shrinks
change colour effect by 25the quickest way to make something look magical
show / hidemakes a sprite appear and disappear

Events

What starts a piece of code

when green flag clickedthe start of almost every program
when space key pressedkeyboard control
when this sprite clickedmakes anything into a button
when I receive message1lets one sprite tell another what to do
broadcast message1sends that message β€” the way scenes and levels are switched

Control

Repeating, waiting and deciding

wait 1 secondsthe pause that makes timing possible
repeat 10does something a fixed number of times
forevernever stops β€” the heart of every game loop
if … thendoes something only when a condition is true
if … then … elseone thing or the other
create clone of myselfmakes a copy while the program runs β€” how you fire bullets or drop raindrops

Sensing

Noticing the mouse, the keyboard and other sprites

touching Sprite1?collision β€” the basis of every catching or dodging game
touching colour?how a maze game knows you hit a wall
key space pressed?checks a key inside a loop, which feels smoother than the event block
ask … and waitgets typed input from the player
answerwhat they typed
timercounts seconds since the program started

Operators

Sums, comparisons and text

+ βˆ’ Γ— /arithmetic
pick random 1 to 10the block that makes a game different every time
< = >comparisons, used inside if blocks
and / or / notcombining conditions
join apple bananasticks two pieces of text together

Variables

Remembering a number or a word

set score to 0always do this at the start, or yesterday's score stays
change score by 1the scoring block
show variable scoreputs it on the screen
add thing to lista list remembers many values β€” high scores, questions, words
item 1 of listreads one of them

My Blocks

Making your own block

define draw squaregives a name to a piece of code you use more than once
draw squareruns it β€” the same idea as a function in Python or a method in Java

Every block is documented in full on the Scratch Wiki β†—, which is where to look when you need the exact behaviour.

Ask GuruAcharya Samayeshwar