Scratch game making tutorial 120a

Love calculator simple - who loves who?

In this tutorial you will make a game that lets you find out how much 2 people love each other!

 

Complete these steps ..

 

1. Download and save these three stage background images ..

 

 

2. Create a new game, then select the stage, and then click the background tab. Import the three background images ..

Now, delete the white one.

 

 

3. Add these scripts to the stage ..

 

 

4. We need three variables for this game. 2 variables for the names and one for the love score.

Create these variables ("for all sprites") ..

Make sure only the "Love score" variable is showing on the stage (ticked).

 

 

5. Select the cat sprite and re-name it "Cat". Now add these scripts to set the size and position of the cat ..

 

 

6. Now, press the "B" key to test your game. Press "E" to end when you are done.

Use "File>Save as" to save your game. Name it "Love calculator".

 

 

7. The cat will ask the player to enter the names of the two people that we want to find out about.

We will use some "ask" script blocks for this. After the player types in the names the game will store them in the "1st name" and "2nd name" variables.

To begin with add a script that sets the "love score" to none ..

 

Now add on a "forever" script block and the "ask and wait" script blocks that ask the player to enter the 2 names.

Notice how after each "ask and wait" script blocks the answer is stored in the variables "1st name" and "2nd name" ..

 

Next, we need to add the "set" script block that chooses a percentage value between 0 and 100 for the "love score" ..

 

Finally we need to add a short wait (4 seconds) script block so the player can see the love score on the stage, before the game starts again.

 

Finally we need to set the love score back to "none" before the game starts again.

 

8. Now, press the "B" key to test your game. Press "E" to end when you are done.

Use "File>Save" to re-save your game.

 

 

9. A nice final touch is to make the stage background change depending on the love score.

Select the stage and add this script ..

 

 

10. Use "File>Save" to re-save your game.

Well done. You've finished. Press the "B" key to test your game. Press "E" to end when you are done.

 

 

11. Can you make this game better?