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

#1 2013-04-15 06:20:41

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Countdown

Is it possible to make the timer count in reverse? (I'm using Scratch vers. 1.4).

Offline

 

#2 2013-04-15 16:14:50

OverPowered
Scratcher
Registered: 2012-07-27
Posts: 100+

Re: Countdown

No, though you could do this: (for a 60-second stopwatch)

when green flag clicked
set [counter v] to (60)
set [reverseTimer v] to (0)
reset timer
forever
set [reverseTimer v] to ((counter) - (timer))


Newest project: Tunnel TEST ~http://blocks.scratchr.org/API.php?user=OverPowered&action=onlineStatus~ On my mind: Unicameralism

Offline

 

#3 2013-04-15 19:10:17

7734f
Scratcher
Registered: 2010-12-23
Posts: 500+

Re: Countdown

Imaginos wrote:

Is it possible to make the timer count in reverse? (I'm using Scratch vers. 1.4).

You could use variables:


when gf clicked
set [timer v] to [60.00]
forever
 change [timer v] by [-0.01]
 wait [0.01] secs
Hope that helped!

With regards

~7734f


http://internetometer.com/image/38992.png   http://i37.tinypic.com/2qixx6c.png

Offline

 

#4 2013-04-15 19:14:14

Hyperbola
Scratcher
Registered: 2013-03-15
Posts: 100+

Re: Countdown

7734f wrote:

Imaginos wrote:

Is it possible to make the timer count in reverse? (I'm using Scratch vers. 1.4).

You could use variables:


when gf clicked
set [timer v] to [60.00]
forever
 change [timer v] by [-0.01]
 wait [0.01] secs
Hope that helped!

With regards

~7734f

This one's a bit inaccurate - OverPowered's works fine though.


Tip of the whatever: Don't post in threads older than 2 weeks unless your post will actually be useful.
It's the last day of 1.4! *cries* (quote from NeilWest, rest by me) by the time you read this it probably will be 2.0  sad

Offline

 

#5 2013-04-16 04:59:44

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Re: Countdown

Thanks Guys.
OverPowered's solution works fine.

Offline

 

#6 2013-04-17 17:44:06

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Re: Countdown

I've intergrated the countdown into my game but it's not updating the variable display properly;

http://scratch.mit.edu/projects/Imaginos/3263324

Offline

 

Board footer