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
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
Offline
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
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.

Offline
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?
Offline
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".
Offline
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
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)
Offline
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]
Offline