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

#1 2012-12-12 14:28:06

andry99
New Scratcher
Registered: 2012-01-24
Posts: 4

Help for countdown timer!

Hello!
I would do a countdown timer with days, hours, minutes and seconds. How can I do it? Please answer me!
P.S.: if there are some errors in the text, sorry for my bad english! ;-)

Offline

 

#2 2012-12-12 20:59:20

SheppardProductions
Scratcher
Registered: 2011-08-14
Posts: 100+

Re: Help for countdown timer!

That's not possible in Scratch.

Offline

 

#3 2012-12-12 21:23:27

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Help for countdown timer!

SheppardProductions wrote:

That's not possible in Scratch.

Actually, it is.  You say

set [num v] to (how many seconds)
set [num 2 v] to (num)
repeat (num 2)
wait (0.98) secs
change num by (-1)


Alt of Firedrake969.

Offline

 

#4 2012-12-13 00:02:50

SheppardProductions
Scratcher
Registered: 2011-08-14
Posts: 100+

Re: Help for countdown timer!

firedrake969_test wrote:

SheppardProductions wrote:

That's not possible in Scratch.

Actually, it is.  You say

set [num v] to (how many seconds)
set [num 2 v] to (num)
repeat (num 2)
wait (0.98) secs
change num by (-1)

Mhmm. And it automatically knows what the day is.

Offline

 

#5 2012-12-13 19:22:03

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Help for countdown timer!

SheppardProductions wrote:

firedrake969_test wrote:

SheppardProductions wrote:

That's not possible in Scratch.

Actually, it is.  You say

set [num v] to (how many seconds)
set [num 2 v] to (num)
repeat (num 2)
wait (0.98) secs
change num by (-1)

Mhmm. And it automatically knows what the day is.

Mhmmmm...
You're right!  xD
Well, you could either make it countdown from when the green flag is clicked for a certain amount of seconds, days, hours, weeks, months, years centuries, millenia, etc. OR wait until Scratch 2.0.  Believe me, you can.


Alt of Firedrake969.

Offline

 

#6 2012-12-13 19:40:58

gfchll
Scratcher
Registered: 2012-04-21
Posts: 100+

Re: Help for countdown timer!

hmmm. have a variable for hours, minutes and seconds.

 when gf clicked 
set [hour v] to [number you want]
set [minute v] to [number you want]
set [seconds v] to [number you want]
forever 
repeat until <(seconds) = (0)>
change [secs v]by (-1)
wait (1) secs
end
change [minutes v] by (-1)
set [seconds v] to (59)
end
to make things cleaner, put the hours in a new script
when gf clicked
forever
wait until <(minutes) = (0)>
change [hour v] by (-1)
set [minutes v] to (59)
end 
does this help?

Last edited by gfchll (2012-12-13 19:43:14)


HELLO EVERYBODY!

Offline

 

Board footer