WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 01-18-2010, 12:04 PM
ursi ursi is offline
Member
 
Join Date: Dec 2009
Posts: 11
Thanks!

And the callback function is ok or do I have to callback also the 'checkTrigger' function?

##############################
#Create the signal object
sig = vizact.signal(Trigg > 0)

#Create an action to wait on the signal
waitsig = vizact.waitsignal(sig)

def ExtTrigg(waitsig)
### add SOUND
song = viz.add('Beethoven.wma')
song.loop(viz.OFF)

###+++++++++++++++++++++++++++
def checkTrigger():
trigg = d.eAnalogIn(0)
if trigg > 0:
ExtTrigg()

vizact.onupdate(0, checkTrigger)

viz.callback(viz.ACTION_BEGIN_EVENT,ExtTrigg)
##############################
Reply With Quote
  #2  
Old 01-18-2010, 06:06 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The line of code
Code:
vizact.onupdate(0, checkTrigger)
already registers the checkTrigger function and that will be called every frame. Have you tried running that on it's own without the code you added?
Reply With Quote
Reply

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
Implement LabJack ursi Vizard 4 01-07-2010 04:14 PM
Updating viewpoint via external computer Rachel Vizard 1 02-04-2008 07:23 PM
labjack plugin Jerry Vizard 1 03-14-2007 05:36 PM
collision events trigger Eunice Vizard 1 01-03-2006 11:39 AM
A hotspot id of -1 will never trigger. jrodman Vizard 1 01-27-2004 04:22 PM


All times are GMT -7. The time now is 07:22 PM.


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