WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Trouble with viz.ontimer (https://forum.worldviz.com/showthread.php?t=3076)

Rinya 11-11-2010 02:40 AM

Trouble with viz.ontimer
 
I've tried making a method that changes the textures on a different walls in a store. The walls are all different textures and can be changed by adjusting the slider in the GUI which calls this method:


Code:

def setLight(light):
    FRAME_RATE = 0.1
    disco = vizact.ontimer(1.0*FRAME_RATE, NextMovieFrame)
   
    if light == 0:
        disco.setEnabled(viz.OFF)
        #Dark light
        darkWall()
    elif light == 1:
        disco.setEnabled(viz.OFF)
        #Normal light
        originalSettings()   
    elif light == 2:
        disco.setEnabled(viz.OFF)
        #Faint light
        lightWall()
    elif light == 3:
        #Disco light
        disco.setEnabled(viz.ON)


The problem is that the viz.ontimer (named disco in this case) doesn't turn off. I even tried using values 0 and 1 instead of viz.ON and viz.OFF, however the 'discolights' still can't be turned off.

I've looked up other threads and tried adding booleans, but still this doesn't work. Does anyone have an idea?

Rinya 11-11-2010 02:59 AM

Resolved..
Apparently - the slider only went from 0-1-2 and back (but not to 3).


All times are GMT -7. The time now is 05:52 AM.

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