multiple timers
i have two timers, one that listens for certain keyboard input, and another that makes a person walk around in my world. I want the first one to be always on, but is there a way to make the second one start after a certain elapsed time, say 5 seconds or so? here's what my timer function looks like:
Code:
def mytimer(num): |
A timer starts whenever you call viz.starttimer(), so your goal is to decide when it's appropriate to make that call.
Something like this sketch (this is not tested code): Code:
timer_one = False |
error
when I try to run that I get this error:
if not timer_one and viz.get(viz.FRAME_TIMESTAMP) > 5.0: AttributeError: 'module' object has no attribute 'FRAME_TIMESTAMP' |
You can also use the Python time module.
Code:
import time |
ok that seems to work fine, thanks!
|
All times are GMT -7. The time now is 09:13 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC