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

#1 2012-08-28 13:31:47

Joewheeeeler
Scratcher
Registered: 2012-05-17
Posts: 40

Timer not working in Scratch, Anyone got any ideas?

Hi Scratchers! Currently I am making a new Game as part of my Scratch Joe's squiggle Gallery (See at http://scratch.mit.edu/galleries/view/166786) on Scratch Desktop for Windows 7 but I cannot get the Timer to work! Can any one give me a helping hand I want it to start counting up to 12 when Green flag is clicked and stop at 12, Making the stop all function work... Here below is what I have got at the moment! Thanks, Joewheeeeler

when gf clicked
set [Timer v] to (0)
wait until  <(timer) > [12]>
stop all
when gf clicked
forever
wait (1) secs
change [timer v] by (1)
end


http://i.imgur.com/CxwNg.gif

Offline

 

#2 2012-08-28 13:35:42

Joewheeeeler
Scratcher
Registered: 2012-05-17
Posts: 40

Re: Timer not working in Scratch, Anyone got any ideas?

Oh, and by the way I have got the Show verible timer to, I just have not included it in the Pictures of blocks above, Sorry about that I have put it above the set Timer to 0 on the first section of Blocks!  smile


http://i.imgur.com/CxwNg.gif

Offline

 

#3 2012-08-28 14:06:30

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Timer not working in Scratch, Anyone got any ideas?

use the actual scratch timer, it's more accurate

when gf clicked
reset timer
wait until <(timer) > (11.9)>
stop all
But stop all does All scripts, so I don't know why you'd want this script.


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#4 2012-08-28 15:07:36

Joewheeeeler
Scratcher
Registered: 2012-05-17
Posts: 40

Re: Timer not working in Scratch, Anyone got any ideas?

Okay, Thank you very Much, I Will change this in my Script and see if it works... Thanks, Joewheeeeler  smile  I Didn't realize you could do it this way, I was just copying the timer script from my other game (http://scratch.mit.edu/projects/Joewheeeeler/2544107) I made, But never mind I'm sure this one will be better...  smile


http://i.imgur.com/CxwNg.gif

Offline

 

#5 2012-08-29 02:57:21

copyrightking
Scratcher
Registered: 2011-06-25
Posts: 24

Re: Timer not working in Scratch, Anyone got any ideas?

[scratchblocks]
when gf clicked
repeat 60
change timeV by -1
end

Offline

 

#6 2012-08-29 02:59:39

copyrightking
Scratcher
Registered: 2011-06-25
Posts: 24

Re: Timer not working in Scratch, Anyone got any ideas?

when gf clicked
repeat 60
change timeV by -1
end

Offline

 

#7 2012-08-29 05:33:13

Joewheeeeler
Scratcher
Registered: 2012-05-17
Posts: 40

Re: Timer not working in Scratch, Anyone got any ideas?

zammer990 wrote:

use the actual scratch timer, it's more accurate

when gf clicked
reset timer
wait until <(timer) > (11.9)>
stop all
But stop all does All scripts, so I don't know why you'd want this script.

Would I still need a Show variable for the Timer Though and if I do were would I put it?

show variable [Timer v]


http://i.imgur.com/CxwNg.gif

Offline

 

#8 2012-08-29 06:22:20

Joewheeeeler
Scratcher
Registered: 2012-05-17
Posts: 40

Re: Timer not working in Scratch, Anyone got any ideas?

Thanks for everyone who helped me create this project by giving me advise! http://scratch.mit.edu/projects/Joewheeeeler/2752014 It is all (Hopefully) Up and running now with a working Timer! Have a look if you want in the script to see how I finally did the timer...  smile


http://i.imgur.com/CxwNg.gif

Offline

 

Board footer