SCRATCH GOLD II
SCRATCH GOLD I
2 of 3

6.07 Adding a timer

Now you will add a timer to your game, so that the player has to get to the island as quickly as possible.

Add a new variable called time to your Stage.

screenshot
  • Click on Variables in the Code tab, then click on Make a Variable.Variable blocks
  • Type in the name of your variable. You can choose whether you would like your variable to be available to all sprites, or to only this sprite. Press OK.
  • Create variable
  • Once you have created the variable, it will be displayed on the Stage, or you can untick the variable in the Scripts tab to hide it.Variable on the stage

You can also choose a look for your timer by changing how your new variable is displayed.

Now add code blocks to your Stage so that the timer counts up until the boat reaches the island.

Test out your game and see how quickly you can get the boat to the island!

screenshot
×
×

Cart