WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #13  
Old 05-22-2009, 02:30 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Don't give up hope yet. Clearly you have some work ahead of you, but listing what your missing is a start.

First, lets fix your stimulus presentation. Your syntax in the experiment task is incorrect. Place "yield" statments in front of 'viztask.wait' functions. Do not put a yield in front of plain functions like 'sceneOn.'

Code:
def experiment():
	
	while True:
		viz.MainScene.visible(viz.OFF)
		yield viztask.waitKeyDown(' ')
		sceneOn(1)
		yield viztask.waitTime(3)
		sceneOff()
		viztask.waitTime(10)
		sceneOn(2)
		d = viz.Data()
		yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT, d)
                pickedObject = viz.pick()
                recordTrialResponse(pickedObject, d.time)
Also i added a viz.pick call to get the geometry the mouse clicked on. It pases the result to a new recordTrialResponse function. I'ed make this function check if it was the correct object and write the results to a file.

Vizard's installation directory has an example directory called file_io that has filewriting examples. If you put a tab between each of your data points and a new line between reach response the data file should import into Matlab or Excel nicely.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing Files on SourceForge farshizzo Vizard 1 09-03-2012 11:18 AM
Project .avi or .mpeg file pattie Vizard 2 02-06-2007 08:09 AM


All times are GMT -7. The time now is 05:47 PM.


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