WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-23-2016, 04:20 AM
jelly jelly is offline
Member
 
Join Date: Feb 2016
Posts: 38
Smile

Jeff, thank you very much! It works perfectly, I have adapted it for my script:

Code:
def delayTask():
	global handstate
	yield viztask.waitTime(2)
	handstate = 1
	print '2 seconds elapsed'
	yield viztask.waitTime(0.7)
	handstate = 0

def proximityTask():
	while True:
		yield vizproximity.waitEnter(SensorIndexFinger)
		print 'entered sensor'
		viztask.schedule(delayTask())

viztask.schedule(proximityTask())
I think I had a good intuition that I needed two steps or two functions to implement this, but I was stuck thinking that I needed the "manager.onEnter". Thanks again!
Reply With Quote
Reply

Tags
proximity, proximity sensor, timing

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Proximity Manager - How to implement delay jelly Vizard 4 11-18-2016 08:48 AM
timer question Elittdogg Vizard 5 10-10-2007 02:49 PM


All times are GMT -7. The time now is 02:56 PM.


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