Tuesday 20 January 2015

Scratch Programming - Lesson 3 - Variables

Lesson Objectives
Create and program variables using Scratch

Starter

What is a variable?
How can they be used in a computer game?






Main
Red Task:
Task 1: Creating a Variable
a) Open your Scratch game and create a 'score' variable












Orange Task
Task 2: Enemy Score
a) Add script to your main character that sets the score to '0' when the game starts







b) Add script to your 'enemy' that will decrease the score by 10 points (-10) when you hit it













Green Task
Task 3: Collecting Points
a) Load or create a sprite to act as a way to collect points (coin, heart, jewel etc.)

b) Add script to your 'good item' that will increase the score by 10 points when you collect it. (Make sure it hides once collected.)


Extension

Try adding a life or health variable into the game that you receive achieving a particular task or after a set amount of time.


Plenary

a) Open your Scratch Evidence Document
b) Complete the Lesson 3 section
c) Save your work


Homework

Complete the next task in your HomeStudy Booklet

No comments:

Post a Comment