View Single Post
  #4  
Old 11-17-2016, 03:29 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
You can add a loop inside the task function:

Code:
def proximityTask():

	while True:
		yield vizproximity.waitEnter(SensorIndexFinger)
		print 'entered sensor'
		yield viztask.waitTime(2)
		print 'two seconds elapsed'

viztask.schedule(proximityTask())
Reply With Quote