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

#1 2012-07-16 13:26:43

Jonas13
New Scratcher
Registered: 2012-07-15
Posts: 3

timer ?

How can you stop the timer?
I don't know.
Please help!

<timer>?!

Offline

 

#2 2012-07-16 13:29:07

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: timer ?

You can't stop it. However, if you want to store its value at a specific time, you can set a variable to its value.


Why

Offline

 

#3 2012-07-16 14:10:30

funelephant
Scratcher
Registered: 2010-07-02
Posts: 1000+

Re: timer ?

Here is an equivalent if you want to stop it.

when gf clicked
set [timer v] to (0)
repeat until <(Whatever you want to happen when it stops)>
change [timer v] by (1)
wait (1) secs


nicki begs to differ
http://24.media.tumblr.com/ab0e6e8fd347c5e39c2821bcab9d16e6/tumblr_mgu35sui1L1rfb7aqo2_500.gif

Offline

 

#4 2012-07-16 14:18:25

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: timer ?

funelephant wrote:

Here is an equivalent if you want to stop it.

when gf clicked
set [timer v] to (0)
repeat until <(Whatever you want to happen when it stops)>
change [timer v] by (1)
wait (1) secs

That way isn't exact. A better way to do it is this:

when gf clicked
set [timer v] to [0]
set [stopper v] to [0]
forever
if <(stopper)=[0]>
wait until <((timer)mod(1))=[0]>
change [timer v] by (1)
reset timer
end
if (event you want)
set [stopper v] to [1]
end
if (different event)
set [stopper v] to [0]
reset timer
end

Offline

 

#5 2012-07-17 10:50:32

Jonas13
New Scratcher
Registered: 2012-07-15
Posts: 3

Re: timer ?

Thanks to everyone, who helped me!

Jonas13  smile

Offline

 

#6 2012-07-18 11:04:40

krzysiogawl01
Scratcher
Registered: 2012-05-02
Posts: 13

Re: timer ?


Don't know how to make a 0s1s stopwatch?
http://scratch.mit.edu/static/icons/buddy/1350608_med.png

Offline

 

Board footer