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

#1 2008-09-11 12:25:53

stahlt
Scratcher
Registered: 2008-09-11
Posts: 8

Timer

Okay I've been using Scratch for 3 years and have completely forgotten how to have a timer count down backwards from 20.  I'm a teacher who needs the answer fast!

Offline

 

#2 2008-09-11 12:52:20

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: Timer

use a variable! set time to 20 forever wait 0.01 secs change time by -0.01. Hope this helps!!!!!

Last edited by registeel (2008-09-11 12:52:47)

Offline

 

#3 2008-09-11 13:23:13

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Timer

stahlt wrote:

Okay I've been using Scratch for 3 years and have completely forgotten how to have a timer count down backwards from 20.  I'm a teacher who needs the answer fast!

I would do like registeel says, use a variable.  But I wouldn't try and make the time decrement so small as there is a significant delay in processing even if the Wait time is set to zero so you wouldn't get very accurate results.  I'd probably do something like

On Green Flag
Set Time_Counter to 20
Repeat 20
    Wait 1 Sec
    Change Time_Counter by -1


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-09-11 21:34:41

stahlt
Scratcher
Registered: 2008-09-11
Posts: 8

Re: Timer

Thank you so much.  It worked perfect.  My student will be so happy tomorrow!

Offline

 

#5 2009-05-27 12:22:54

stahlt
Scratcher
Registered: 2008-09-11
Posts: 8

Re: Timer

I've been running into a strange problem that hasn't happened all year in my computer lab.  Kids have been selecting backgrounds from Scratch and they have not been importing.  It's funny it's certain backgrounds like the underwater one.  Has anyone else had this problem.  You click on the background and nothing.

Offline

 

#6 2009-05-27 16:52:06

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: Timer

stahlt wrote:

I've been running into a strange problem that hasn't happened all year in my computer lab.  Kids have been selecting backgrounds from Scratch and they have not been importing.  It's funny it's certain backgrounds like the underwater one.  Has anyone else had this problem.  You click on the background and nothing.

That's kind of an odd problem. I have heard of problems with SCRATCH 1.3 concerning .bmp image files, but the underwater file is a .gif file. Maybe someone else here has an idea of what is going on, but a possible quick fix could be converting the image file extension to something else such as a .jpeg file or .png file.


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#7 2009-05-27 23:00:01

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Timer

stahlt wrote:

I've been running into a strange problem that hasn't happened all year in my computer lab.  Kids have been selecting backgrounds from Scratch and they have not been importing.  It's funny it's certain backgrounds like the underwater one.  Has anyone else had this problem.  You click on the background and nothing.

Does it work if you try opening the backgrounds folder manually and dragging the image file onto the costumes space?


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#8 2009-05-28 04:11:12

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Timer

stahlt wrote:

I've been running into a strange problem that hasn't happened all year in my computer lab.  Kids have been selecting backgrounds from Scratch and they have not been importing.  It's funny it's certain backgrounds like the underwater one.  Has anyone else had this problem.  You click on the background and nothing.

I wonder if you could be seeing a file permissions problem...check the file permits and see if they are restricted in some way.

By the way...this should really have been a new topic (click on the Create Topic link on the Index page for the Troubleshooting forum) since it has nothing to to do with the topic of this thread which is "Timer".   smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#9 2009-07-14 05:22:22

twilghtlover
Scratcher
Registered: 2009-07-14
Posts: 1

Re: Timer

Right, i am trying to put a timer on my game for 60seonds and i need help?!>!
If you can help then can you put it clearly cause i am rather stupid?L

Offline

 

#10 2009-07-14 09:23:37

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Timer

twilghtlover wrote:

Right, i am trying to put a timer on my game for 60seonds and i need help?!>!
If you can help then can you put it clearly cause i am rather stupid?L

Okay all you have to do is make this code:
[blocks]
<when green flag clicked>
<set{ timer }to( 1)
<reset timer>
<repeat until> <( <{ timer }> <<> .1 )>
<set{ timer }to( (( 60 <-> <timer> ))
<end>
<think[ Now the timer is over! ]for( Do whatever you want! )secs>
[/blocks]
For a better looking tutorial look here:
http://img197.imageshack.us/i/picture3pqx.png/

Last edited by demosthenes (2009-07-14 09:23:53)


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

#11 2009-07-14 12:33:18

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Timer

How about this one?

[blocks]
<when green flag clicked>
<reset timer>
<wait until><( <timer> <>> 60 )>
<say[ Yay!  The timer is done! ]for( 2 )secs>
[/blocks]


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer