PDA

View Full Version : Countdown


CRI
07-22-2010, 11:44 AM
Want to do a 10 seconds countdown

How to do it

thank you!!

Jeff
07-22-2010, 02:56 PM
You could use a timer function or a loop in a task function:
import viz
viz.go()

text = viz.addText('',viz.SCREEN)
text.setPosition(0.45,0.5)

counter = 10
def countDown():

global counter
text.message( str( counter ) )
counter -= 1

vizact.ontimer2(1,10,countDown)

CRI
07-25-2010, 07:53 AM
If I want to stop reading the beginning of time

How can I stop? Clean?

Thank

Jeff
07-26-2010, 06:28 PM
Sorry, I'm not sure what you are asking. Can you explain a little more?

CRI
07-28-2010, 09:45 AM
I would like to pause time halfway

Countdown at the beginning

thank you