Discuss Scratch

RandomBoy888
New Scratcher
1 post

Can you stop the timer?

Can you stop the timer(s)???
drmcw
Scratcher
1000+ posts

Can you stop the timer?

No, just reset it to zero.
dr3w8
Scratcher
100+ posts

Can you stop the timer?

No, you can not stop the timer.
mwiedmann
Scratcher
100+ posts

Can you stop the timer?

You shouldn't reset the timer because then you can't have multiple time based events in your program.

If you have events that need to occur every X seconds, the best thing to do is to create a variable to handle each one. That way you don't have to reset the timer. Let's say you have a game and want to create an alien ship every 10 seconds. You would:

1st create a variable “AlienTimer”

When GF Clicked
Set AlienTimer = timer
Forever
If AlienTimer + 10 < timer Then
create clone of alien
Set AlientTimer = timer

If you have other timed events you just create another variable for each event and handle the same way.
Tezliov
Scratcher
71 posts

Can you stop the timer?

You can't stop the timer, but you can reset it or make a variable set to it, which will freeze the timer in the variable.

Last edited by Tezliov (June 19, 2013 15:16:32)

xlk
Scratcher
100+ posts

Can you stop the timer?

you can make a timer, have a variable that is constantly changed by 1, you could stop that. Be warned, you wouldn't have a seconds timer, but a frame timer…
werewolf03
New Scratcher
1 post

Can you stop the timer?

No you can only reset it i think
clubby789
Scratcher
54 posts

Can you stop the timer?

Tezliov wrote:

You can't stop the timer, but you can reset it or make a variable set to it, which will freeze the timer in the variable.

I was going to say that!

Powered by DjangoBB