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

#1 2012-11-18 21:00:46

BurritoSM
Scratcher
Registered: 2012-11-11
Posts: 33

Faulty Timer (HELP)

If you don't understand what I mean, go to this project: http://scratch.mit.edu/projects/BurritoSM/2918480

Hello, I am having slight difficulties with my timer/score keeper.

In each sprite of it, I have the following script:

when gf clicked
forever
   wait (0.01)
   next costume
end
Anyways, I add 1000% of the wait time to each timer, so I have one that goes 0.01, 0.1, 1, 10, and 100 seconds.  My problem is that my 1 and 10 sprite are off.  My 10 changes before my 1 gets even to 9.

Meaning, the following happens:

4799
5899
5999
5099

Could anyone help?

Offline

 

#2 2012-11-18 21:13:53

fetchydog567
Scratcher
Registered: 2011-12-28
Posts: 500+

Re: Faulty Timer (HELP)

Uh,

when gf clicked
forever
wait (1) secs
next costume
end


http://www.minecraftanonymous.com/assets/banners/banner_51.pngJust a reminder I won't be on Scratch that much but I 'll still be here, so if i'm on something, I will be commenting back, okay! wink , PICO Team!!!!!!!!!!! SCRATCH DEADW!!! PICO HACK ACCOUTNTT@@

Offline

 

#3 2012-11-18 21:26:26

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Faulty Timer (HELP)

Are you sure that you have the right delay for your 10?


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2012-11-18 22:20:37

BurritoSM
Scratcher
Registered: 2012-11-11
Posts: 33

Re: Faulty Timer (HELP)

ErnieParke wrote:

Are you sure that you have the right delay for your 10?

Yes, I have checked it several times.

Offline

 

#5 2012-11-19 07:19:44

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Faulty Timer (HELP)

BurritoSM wrote:

ErnieParke wrote:

Are you sure that you have the right delay for your 10?

Yes, I have checked it several times.

Maybe you have the 10 and some other number switched so that they're in the wrong positions?


http://i46.tinypic.com/35ismmc.png

Offline

 

#6 2012-11-19 07:36:11

BurritoSM
Scratcher
Registered: 2012-11-11
Posts: 33

Re: Faulty Timer (HELP)

Nope.  I've checked all the values more than once, they are all the previous one /10.

Offline

 

#7 2012-11-19 16:51:42

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Faulty Timer (HELP)

I think it's to do with the timing of scratch itself. Try doing something like this:

when gf clicked //in the 1 sprite
forever
wait (1) secs
next costume
if <(costume #) = (10)>
broadcast [next1 v]


when i receive [next1 v] //In the 10 sprite
next costume
if <(costume #) = (10)>
broadcast [next2 v]

when i receive [next2 v] //In the 100 sprite
next costume
if <(costume#) = (10)>
broadcast [next3 v]
...and so on for all the sprites you need.

Last edited by joefarebrother (2012-11-19 16:52:26)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#8 2012-11-19 18:04:30

BurritoSM
Scratcher
Registered: 2012-11-11
Posts: 33

Re: Faulty Timer (HELP)

Oh, thanks!

Offline

 

#9 2012-11-19 18:41:35

BurritoSM
Scratcher
Registered: 2012-11-11
Posts: 33

Re: Faulty Timer (HELP)

It didn't work  sad

Offline

 

Board footer