Page 72 - Computer - 3
P. 72
CREATING A SCRIPT
Scripts are created by combining blocks together.
• To create a script for a sprite, drag the required
block from the Blocks palette to the Coding area.
• To combine blocks, attach the new blocks under
the existing group of blocks.
• To remove a block from the script, simply drag it
off from the Coding area.
• To execute a script, click the top-most block in the stack of blocks.
UNDERSTANDING BLOCKS
Blocks are the building units of any project in Scratch 3. The various categories of
Blocks present in Scratch 3 are – Motion, Looks, Sounds, Events, Control, Sensing,
Operators, Variables, and My Blocks. Let us learn about some commonly used blocks.
Motion Blocks
The Motion blocks are used to move and turn the sprite in different directions. These
blocks are colour-coded blue. Some blocks in the Motion blocks category are:
Block Function
Moves the sprite ‘n’ steps in the direction faced by sprite;
a negative value moves the sprite in backward direction.
Turns the sprite by ‘n’ degrees clockwise.
Turns the sprite by ‘n’ degrees anti-clockwise.
Moves the sprite to specified x and y coordinates on the
Stage.
Moves the sprite to the location of the mouse pointer
on the Stage.
Moves the sprite smoothly to specified x and y
coordinates over a specified time.
Bounces the sprite in the opposite direction when it
touches a boundary of the Stage.
70