View Full Version : Event control

06-18-2012, 09:53 AM
In my virtual world I have three targets. When I touch the first target for the first ten minutes I want it to fade out and target 2 to fade in. However, after 10 minutes I want target 3 to fade in. If this is my script for the exit proximity for the three spheres, does anyone know how I can write the conditions in? All the targets (spheres) were created outside of the exit proximity.

def ExitProximity(e):
fade = vizact.fadeTo(0,speed=2)
fade2 = vizact.fadeTo(1,speed=2)
fade3 = vizact.fadeTo(1,speed=2)

06-22-2012, 10:32 AM
When your callback function is called you can get the time the simulation has been running using the viz.getFrameTime() command. You can set up the condition statements with the returned value.

06-26-2012, 12:19 PM
Okay, we were able to get it to work.

Next Question: Is there a way to get a timer to start when we run the script (That being time zero) and then record each time a target is touched from there? I thought I read it in a script somewhere, and now I can't find it.