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

#1 2011-06-21 08:54:59

frizzlepuss893
Scratcher
Registered: 2011-06-10
Posts: 100+

timer

in my new game, there is a timer for getting to the end it you choose hard, very hard, or impossible. i can get the timer to set right and show and count down each time, but each time i test it, when it reaches 0, "u lose" doesnt pop up like it does when you run out of lives. i have tried lots of different combinations for the script. please, i need help, as this is the VERY LAST THING I NEED TO DO!


"Wait, what?"-Frizzlepuss. Jumpathon 5! play now!
The scratch song! Congratulations scratch! 2 million projects!

Offline

 

#2 2011-06-21 09:05:21

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: timer

Most likely the timer is reaching a tiny number like 0.00001 (with the 1 hidden), or skipping 0.  You can solve this by adding "if round(timer)=0" or "if timer < 1".  Or something like that.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2011-06-21 09:13:08

frizzlepuss893
Scratcher
Registered: 2011-06-10
Posts: 100+

Re: timer

thank you very much for that


"Wait, what?"-Frizzlepuss. Jumpathon 5! play now!
The scratch song! Congratulations scratch! 2 million projects!

Offline

 

#4 2011-06-21 09:38:03

frizzlepuss893
Scratcher
Registered: 2011-06-10
Posts: 100+

Re: timer

Kileymeister wrote:

Most likely the timer is reaching a tiny number like 0.00001 (with the 1 hidden), or skipping 0.  You can solve this by adding "if round(timer)=0" or "if timer < 1".  Or something like that.

i already did those, here is the broken script: when i receive timer time which makes the timer appear and start (the starting number is on more scripts) forever:change timer by -0.1 . wait 0.1 secs. under that an if: touching sprite 7 and level = 3, stop script (that one works i think) but under that is if timer = 0, show, then stop script right under show. the script doesnt go off immeadiatly at the start, but hwne the timer hits 0, 0.0, -0, or -0.0, none of those work. i just dont get it...


"Wait, what?"-Frizzlepuss. Jumpathon 5! play now!
The scratch song! Congratulations scratch! 2 million projects!

Offline

 

#5 2011-06-21 09:52:38

frizzlepuss893
Scratcher
Registered: 2011-06-10
Posts: 100+

Re: timer

ok nevermind anymore i fixed it YAY! in a few seconds this game will be on scratch...


"Wait, what?"-Frizzlepuss. Jumpathon 5! play now!
The scratch song! Congratulations scratch! 2 million projects!

Offline

 

Board footer