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

#1 2012-06-12 21:10:24

17yanb
New Scratcher
Registered: 2012-03-12
Posts: 2

Stopping the timer

So in my game that I am making, I have a timer set for 60 seconds which is the time given to complete the game. When the 60 seconds are over, the timer doesn't stop and continues to go on and on. How do I stop it from going on and on? I don't want to reset it, I know how to do that, but is it possible to stop the timer?

Offline

 

#2 2012-06-12 21:21:24

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

Re: Stopping the timer

No. But what you can do is instead of having

if <<timer>=[60]>
stuff
end
You could have
if <(timer) > (60)>
stuff
end

Last edited by TorbyFork234 (2012-06-12 21:21:45)

Offline

 

#3 2012-06-12 21:47:05

17yanb
New Scratcher
Registered: 2012-03-12
Posts: 2

Re: Stopping the timer

Thank you. I am going to try that now.

Offline

 

#4 2012-06-12 23:37:12

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Stopping the timer

Another way to do it would be to have a variable constantly set like this:

set [time v] to (round ((60)-(timer)))
if <(time) = (0)>
  stop script
end


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#5 2012-06-15 12:36:46

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Stopping the timer

TorbyFork234 wrote:

No. But what you can do is instead of having

if <<timer>=[60]>
stuff
end
You could have
if <(timer) > (59)>
stuff
end

I changed it to 59 seconds because it would stop at 61.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#6 2012-06-16 03:05:08

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Stopping the timer

Firedrake969 wrote:

TorbyFork234 wrote:

No. But what you can do is instead of having

if <<timer>=[60]>
stuff
end
You could have
if <(timer) > (59)>
stuff
end

I changed it to 59 seconds because it would stop at 61.

No, now it will stop at 59.1 seconds. Remember, the (timer) reports a decimal.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#7 2012-06-16 21:02:49

Andres-Vander
Scratcher
Registered: 2010-09-16
Posts: 1000+

Re: Stopping the timer

The timer in scratch is really inaccurate


http://www.gifsoup.com/view1/2260823/flugelhorn-feline-o.gif

Offline

 

Board footer