No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
88x31.png
README.md
maketimevariable.png
timer-final.png
timer.png
variable-screen.png
wait.png

README.md

scratch3_timer

CREATE A SIMPLE TIMER IN SCRATCH 3.0

How to create a timer in Scratch 3.0

One of the useful things in Scratch, for example, a game is a timer. Giving a user a set amount of time to complete a task or time how long it takes to complete a task.

One way to do this in Scratch 3.0.

A wait block:-

wait block

Adds a delay (in this case one (1) second) to a program. This is fine to control the speed of a program, what if we want to give the user some feedback, as in display the time taken on the screen.

Within Scratch if we use variables we can display information on the screen. First we need to create a variable for our timer.

Under variables :- Click 'Make a Variable'

Variables

As we need to create a variable to hold the value time, we will call this time.

make_variable

Now that we have created somewhere to hold some data on time we can create, for this example a simple program to do something with it.

final_program

So what is going on here ? So What is happening here:

  1. Press green flag.

  2. Set the Variable ‘time’ (pull down menu) to the value of 59.

  3. Start loop

  4. Change the value of ‘time’ by -1 (minus 1)

  5. Wait for 1 second

  6. go back to 4, unless the value is 0 in which case stop the loop and run any code after the loop has ended at 0.

This how_to has been created by Paul Sutton (zleap) http://www.zleap.net

Please feel free to modify and improve, pull requests welcome. All graphics (other then the cc logo below) have been created, by myself with a screen shot of scratch 3.0.

Pull request back are welcome. Hope this resource is useful.

cc-logo