Avatar

Avatar
MrsAnderson

Tuesday, 23 February 2016

Cover 7xcIS1 Weds 24th Feb Period 5 Rm 675

Scratch 3 - Variables - COVER 

LO To understand the concept of variables
Create and program variables using Scratch

FOLLOW THESE INSTRUCTIONS VERY CAREFULLY! 

A variable in Scratch Programming is something that can change - ie:  score, lives, health bar. Today you're going to create a Score.  Read and following the instructions very carefully.


Task 1: Creating a Variable

a) Open your Scratch game from your Sites folder and create a 'score' variable.  You'll need to find the Orange Variable icon.  Yours could say DATA instead of Variable, so check carefully.
Follow this diagram












Task 2: Enemy Score

a) Add script to your main character/ goody that sets the score to '0' when the game starts







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










Task 3: Collecting Points

a) Load or create a sprite to act as way to collect points (coin, heart, jewel etc.)

b) Add script to your 'good item' that will increase the score by 10 points


EXTENSION: 

Try adding a life or health variable into the game - what impact does this have? 

No comments:

Post a Comment