Scratch Lesson 6

13
Scratch Lesson 6 1

Transcript of Scratch Lesson 6

Page 1: Scratch Lesson 6

Scratch

Lesson 6

1

Page 2: Scratch Lesson 6

Starter

1. Load Scratch

2. Make a game that will make a sprite change colour when it touches another sprite

2

Page 3: Scratch Lesson 6

Objective of the lesson

Use a variable

• All of you will:

– Create a variable that changes its value when a sprite is clicked

• Most of you will:

– Set a variable’s starting value and count up and down with variables

• Some of you will:

– Create a working game that keeps score and has a time limit

3

Page 4: Scratch Lesson 6

4

Page 5: Scratch Lesson 6

How much do you remember?

1. When does the script run?

2. Where would you find the option to change the colour of the sprite?

3. Where would you find the “Go to X and Y” option?

4. Where would you find the random option?

5

Page 6: Scratch Lesson 6

Over to you…

• Change the background and add a sprite of your choice.

• Add the script as shown below.

6

Page 7: Scratch Lesson 6

7

Page 8: Scratch Lesson 6

How much do you remember?

1. What is a variable?

2. How can you make a new variable?

3. How can I change the value of my variable?

4. When do you want the variable to start from 0 again?

5. How can you set the variable to 0?

8

Page 9: Scratch Lesson 6

Use a variable

• Make a variable called Score.

• Change the script so that when your sprite is clicked it will add one to the score.

• Change the script so that when the green flag is clicked the score will be set to 0.

• Try out your game.

9

Page 10: Scratch Lesson 6

Over to you…• Make your own game which has two sprites.• Make one follow your pointer and the other

move around the screen on its own.

• When one sprite touches the other, change the score and then move to another part of the screen.

• Try out different ideas to make your game more interesting andexciting to play.

10

Page 11: Scratch Lesson 6

Counting down

• What will this code do?

• Add this code to your game to make a time limit so that after 60 seconds the game will stop.

• The “=” can be found in

11

Page 12: Scratch Lesson 6

Look at other peoples’ games

Have a look the games that your classmates have created.

1. What do you like about them?

2. What did people do that was different to your game?

3. If you got stuck, what did youdo to help yourself solve the problem?

12

Page 13: Scratch Lesson 6

What skills have you practiced today?

New skills you have learnt today…

13

Revisit skills from another lesson…