Timer problem

I'll see if I can find a solution.

Try posting Yes.<span></span>.

There have been bunches of projects, dating back to the early BYOB days, to enable pausable timers in Snap! code. Basically you remember the time of the most recent resume from a pause, and you remember the amount of time that had accumulated before the most recent pause, and from that you can compute the timer's current value. (And of course you remember a Boolean timer-paused flag.)

You can use lambda-based object generation to allow multiple timers, each individually pausable, if you want.

i don't want to pause the timer in the game...

i want the timer pause if the user press :image
and resume if the user press :image

and another way to telle me when the program will resume

The behaviour of the timer is locked - it's been like that since dawn of time :slight_smile:

As Brian has said, there have been lots of discussions and posts on this subject and many ways of getting around it.

Good topic but the timer continue if i pause/resume the program with the pause button in the UI of snap!... (not the spacebar...)

I have to trap if the user hit the pause button in the UI of snap! and i have to trap if the user hit the resume button.image

Will this do:
untitled script pic

Thank you, i will test it...

I remixed it a little bit:
image
project

Thank you !

Do you know who write the blocks for the timer (new timer, start timer, stop timer and timer)

I save the blocks 6 months ago but i don't note the author...

That was a really long time ago... Any old-timers remember?

I tried to see if it was a project by Jens, but it doesn't seem to be.

No, it was a kid. One of the Scratch AT kids.

You remember knowing the project existed?

Oh yes. It was one of the very first BYOB projects posted online.

I'm thinking it might be on s.b.e/explore, and there's a very helpful button to go to the last set of the 4878 published projects.

4878 pages of published projects. But no, those early Snap! projects were born in Snap!. I don't think we copied BYOB projects over en masse. Where it might be findable is in the archived BYOB thread from the Scratch forum.

Yes, I made a mistake. It's 73162 projects.

Where's that?

Good question. At one time I had it on my computer, but apparently not any more. Maybe the Wayback Machine has it... Or maybe I can dig up an old computer. :~/ Or maybe @tjvr has a copy?

I did find a Snap! topic in the Wayback Machine, probably from the Scratch Wiki. I'll check my history.

Edit: the Wayback Machine one; the current one.