WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-25-2013, 05:45 AM
krimble krimble is offline
Member
 
Join Date: Nov 2006
Location: Nijmegen
Posts: 63
wait for vizproximity and waitKeyDown in task

Hi,
my name is Jeroen and I'm having troubles with waiting inside a viztask.

I would like to have to wait for an vizproximity.waitEnter and for an waitKeyDown. If one of them occurs go on, otherwise wait.

Code:
d = yield viztask.waitAny(vizproximity.waitEnter([c2Sensor]), viztask.waitKeyDown( ["t"] ))
						print d
						pp_pickedCard = '1'
						card02.addAction( vizact.fadeTo(fadeAmount,time=1) )
The error i'm getting is this.
TypeError: 'waitEnter' object is not iterable

I thought adding viztask. in front of vizproximity would work but that results in:
AttributeError: 'module' object has no attribute 'vizproximity'

Does anyone have any tips \ pointers \ advise on how I can do this?

Thank you!
Reply With Quote
  #2  
Old 07-26-2013, 02:32 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you place the conditions to wait for in a list it should work:
Code:
yield viztask.waitAny([vizproximity.waitEnter(c2Sensor),viztask.waitKeyDown("t")])
Reply With Quote
  #3  
Old 08-14-2013, 04:14 AM
krimble krimble is offline
Member
 
Join Date: Nov 2006
Location: Nijmegen
Posts: 63
Ah Jeff, thanks for the reply! Monday I'm able to try, but I.m positive this works.
Reply With Quote
Reply


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
Key presses, waitKeyDown javadi Vizard 1 05-06-2013 10:50 AM


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


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