Scratch
Lesson 5
1
Starter
1. Open the Cat Run game
2. Complete the script so that:
• when the cat touches the green
colour it moves back 5 steps
• when the right arrow key is pressed it
turns 15 degrees to the right
• when the left arrow key is pressed it
turns 15 degrees to the left
2
Objective of the lesson
Move a sprite using the keyboard
• All of you will:
– Make a sprite turn and move using the keyboard
• Most of you will:
– Understand the X and Y positions and use them to
control a sprite to write your name
• Some of you will:
– Make a game using two methods to move the sprites
3
X and Y
X is about the left and right position
Y is about the up and down position
4
X = -240 X = 240
Y = 180
Y = -180
X and Y
Where would X = 0 and Y = 0 be on the box
below?
5
X = -240 X = 240
Y = 180
Y = -180
Here, in
the centre
X and Y
Where would X = 240 and Y = 0 be on the
box below?
6
X = -240 X = 240
Y = 180
Y = -180
Here
X and Y
Where would X = -100 and Y = 180 be on
the box below?
7
X = -240 X = 240
Y = 180
Y = -180
Here
X and Y
Where would X = 120 and Y = -100 be on
the box below?
8
X = -240 X = 240
Y = 180
Y = -180
Here
Pen game
• Open the Pen game.
• Complete the scripts so that
when the other arrow keys
are pressed they move the
sprite in the correct
direction.
• Test it out by clicking on the
green flag and
try to write
your name.
9
Bat game
• Create a new game;
change the background
and delete the cat
sprite.
• Add the Bat sprite and
import a second
costume showing the
bat with its wings in a
different position.
10
Add the script
• When the green flag is
clicked, make the bat
change costume every
0.25 seconds.
• When the arrow keys
are pressed then
make the bat move in
that direction.
11
What will this script do?
• Add a sprite of your
choice and the script as
shown.
• Alter the script so that
your new sprite will
point towards the bat
before it starts moving.
12
Over to you…
• Try to think of different ways
you could make your game
more exciting.
• Try out each others’ games
and decide what makes a
good game.
• Why are some games better
than others?
13
What skills have you practiced today?
New skills you have learnt today…
14
Revisit skills from another lesson…

Scratch Lesson 5

  • 1.
  • 2.
    Starter 1. Open theCat Run game 2. Complete the script so that: • when the cat touches the green colour it moves back 5 steps • when the right arrow key is pressed it turns 15 degrees to the right • when the left arrow key is pressed it turns 15 degrees to the left 2
  • 3.
    Objective of thelesson Move a sprite using the keyboard • All of you will: – Make a sprite turn and move using the keyboard • Most of you will: – Understand the X and Y positions and use them to control a sprite to write your name • Some of you will: – Make a game using two methods to move the sprites 3
  • 4.
    X and Y Xis about the left and right position Y is about the up and down position 4 X = -240 X = 240 Y = 180 Y = -180
  • 5.
    X and Y Wherewould X = 0 and Y = 0 be on the box below? 5 X = -240 X = 240 Y = 180 Y = -180 Here, in the centre
  • 6.
    X and Y Wherewould X = 240 and Y = 0 be on the box below? 6 X = -240 X = 240 Y = 180 Y = -180 Here
  • 7.
    X and Y Wherewould X = -100 and Y = 180 be on the box below? 7 X = -240 X = 240 Y = 180 Y = -180 Here
  • 8.
    X and Y Wherewould X = 120 and Y = -100 be on the box below? 8 X = -240 X = 240 Y = 180 Y = -180 Here
  • 9.
    Pen game • Openthe Pen game. • Complete the scripts so that when the other arrow keys are pressed they move the sprite in the correct direction. • Test it out by clicking on the green flag and try to write your name. 9
  • 10.
    Bat game • Createa new game; change the background and delete the cat sprite. • Add the Bat sprite and import a second costume showing the bat with its wings in a different position. 10
  • 11.
    Add the script •When the green flag is clicked, make the bat change costume every 0.25 seconds. • When the arrow keys are pressed then make the bat move in that direction. 11
  • 12.
    What will thisscript do? • Add a sprite of your choice and the script as shown. • Alter the script so that your new sprite will point towards the bat before it starts moving. 12
  • 13.
    Over to you… •Try to think of different ways you could make your game more exciting. • Try out each others’ games and decide what makes a good game. • Why are some games better than others? 13
  • 14.
    What skills haveyou practiced today? New skills you have learnt today… 14 Revisit skills from another lesson…