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

#1 2009-04-05 18:37:27

capitain47
Scratcher
Registered: 2008-06-18
Posts: 4

Timer

I'm a veteran with scratch and i can use easily all its tools except one, the timer.
It starts when i don't want, it doesn't stop, just reset...
Please somebody help me with timer? Is there any tutorial or topic talking about it?
Can I put a countdown timer?

Last edited by capitain47 (2009-04-05 18:38:33)

Offline

 

#2 2009-04-05 19:42:48

Mike_W
Scratcher
Registered: 2009-02-05
Posts: 100+

Re: Timer

The best you can do (until they add a pause timer function who knows maybe in 1.5) is to run a variable to track pased time.

MyFakeTimer = timer - paused time
Then set pause time - when it's paused and look at the timer to figure out how long it's been paused.

I am having a hard time explaining it as I best could - I might put up a small project.

Offline

 

#3 2009-04-05 19:50:45

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Timer

Or just do what I do... A entirely new timer.

[blocks]<when green flag clicked>
<set{ time }to( 0
<forever>
<wait( 1 )secs>
<change{ time }by( 1
<end>[/blocks]

Although, that might cause a lil' bit of lag on huge projects. So Mike's way is better.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#4 2009-04-06 10:59:29

capitain47
Scratcher
Registered: 2008-06-18
Posts: 4

Re: Timer

thank you
Now i know i can't complete my project (just kidding). I'll try by your way technoguyx

Offline

 

Board footer