This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-03-13 11:15:12

sorchasparkles
New Scratcher
Registered: 2013-03-13
Posts: 2

Timer

How do I create a timer which will help broadcast you won or you lose after a timelimit is up. I am new to scratch.

Offline

 

#2 2013-03-13 11:39:57

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Timer

You're in luck, because Scratch has a basic timer built in.  smile  The simplest way is to reset the timer to 0 and wait until it counts up to a certain time, then check the score and broadcast a message accordingly, like so:

when gf clicked
reset timer
wait until <(timer) > [your time]>
if <(score) > [necessary score]>
 broadcast [win]
else
 broadcast [loss]
end


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2013-03-14 10:35:32

sorchasparkles
New Scratcher
Registered: 2013-03-13
Posts: 2

Re: Timer

Brilliant than you so much.

Offline

 

#4 2013-03-14 22:16:15

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Timer

Glad to help.  smile


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer