WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-18-2007, 09:23 AM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
timer question again

So I've created an "elapsed time" timer. Now I want that timer to start when I start my program (i.e. when I start moving the picture) (which starts on an "onkeydown" command).

def timer1():
print 'Elapsed time:',viz.elapsed(), 'seconds'
vizact.ontimer(60,timer1)
def onkeydown(key):
if key == ' ':
quad.add(MovingRoom)


So what happens now is once Vizard is done loading the stimulus timer1 starts automatically and even if I don't start moving the picture. So after 60 seconds it will print something like "Elapsed time: 60.0023467 seconds". What I need Vizard to do is to start that only once I've hit the spacebar ' ' key to start moving the picture. But I'm having a lot of trouble embedding it in there without having a whole other timer. What can I do?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:55 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC