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

#1 2009-09-06 10:21:07

Coreyc
Scratcher
Registered: 2009-09-05
Posts: 64

Timer suggestion.

They should have start/stop blocks for the timer. P.S. Check out my projects.

Last edited by Coreyc (2009-09-06 14:52:28)


Pie cheers me up. Check out my Mini Games 2 Beta 1

Offline

 

#2 2009-09-06 10:33:35

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Timer suggestion.

I have wondered about this for a while...

Code:

[when green flag clicked]
[reset timer]
[set [go?] to [1]]
[set [wait] to [0]]
[forever]
[][if <(go?) = [1]>]
[][][set [mytimer] to ((timer) - (wait))]
[][else]
[][][wait until <(go?) = [1]>]
[][][set [wait] to ((timer) - (mytimer))]
[][end of if]
[end of forever]

When 'go?' is 1 the timer is going and when 'go?' is 0 it is not going.

Last edited by The-Whiz (2009-09-06 10:34:51)

Offline

 

#3 2009-09-06 10:55:30

WeirdF
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Timer suggestion.

Just make a variable called timer.


http://i.cr3ation.co.uk/dl/s1/gif/847032b8a331def77529b6a0384db1fe_handfingers.gif

Offline

 

#4 2009-09-06 14:47:43

Coreyc
Scratcher
Registered: 2009-09-05
Posts: 64

Re: Timer suggestion.

Thanks for the info.


Pie cheers me up. Check out my Mini Games 2 Beta 1

Offline

 

#5 2009-09-06 22:32:01

Lukster99
Scratcher
Registered: 2008-06-30
Posts: 19

Re: Timer suggestion.

[blocks]<when green flag clicked><forever><wait(1)secsc><change{ Timer }by(1[/blocks]
simple

Offline

 

Board footer