![]() |
|
#2
|
|||
|
|||
|
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:
Code:
blankTexture = viz.addBlankTexture(size=(100,100))
def executeExperiment():
for trialNumber in range(3):
# Show blank texture for one second
screen.texture(blankTexture)
yield viztask.waitTime(1)
# Show movie texture for 1.5 seconds
screen.texture(movieImages.next())
yield viztask.waitTime(1.5)
print('Trial Done: ', trialNumber)
print('done with experiment')
|
| Tags |
| images, tasks, vizard 7 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vizard 4 Beta Testing | farshizzo | Announcements | 0 | 02-01-2011 10:46 AM |
| Vizard 4 Beta Testing | farshizzo | Vizard | 0 | 02-01-2011 10:46 AM |
| Vizard tech tip: Using the Python Imaging Library (PIL) | Jeff | Vizard | 0 | 03-23-2009 11:13 AM |
| Vizard Tip of the Month: Use Tasks to Simplify your Code | Gladsomebeast | Vizard | 5 | 05-02-2008 04:30 PM |