View Single Post
Old 07-12-2021, 06:05 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,467
Use viztask.waitTime instead of vizact.ontimer to wait inside of a task function. It seems like you can place the sequential actions in a single task function:
blankTexture = viz.addBlankTexture(size=(100,100))

def executeExperiment():
    for trialNumber in range(3):
        # Show blank texture for one second
        yield viztask.waitTime(1)

        # Show movie texture for 1.5 seconds
        yield viztask.waitTime(1.5)

        print('Trial Done: ', trialNumber)
    print('done with experiment')
Reply With Quote