Avatar

Avatar
MrsAnderson

Sunday, 31 January 2016

7wb2, 7xd4 Cover. Periods 4 and 5 Monday 1st February.

LOvCreate and program variables using Scratch

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


No comments:

Post a Comment