WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 03-31-2009, 09:50 AM
durf durf is offline
Join Date: Feb 2009
Posts: 61
stopping a function


I have def func1() and def func2() that do not run on timers of there own. I have a def maintask() that controls when each of the def() will start. The problem I am having is once func1() time has expired and func2() timer starts func1() keeps runnning.
def MainTask():
	#Run func1 for 10 seconds
	timer = vizact.ontimer2(0,0,func1)
	yield viztask.waitTime(10)
	#Run func2 for 10 seconds
	timer = vizact.ontimer2(0,0,func2)
	yield viztask.waitTime(10)

	#Quit script
	timer = vizact.ontimer2(0,0,func3)
	yield viztask.waitTime(viz.FOREVER)
viztask.schedule( MainTask() )
how do I stop func1() from running once func2() has started?

I can supply more code if need be. Just looking for an example
Reply With Quote

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
Walking Function Moh200jo Vizard 2 02-24-2009 10:07 AM
Documentating function names aaThomas Vizard 5 05-15-2007 09:50 AM
Do you know how to send a value for 'pool' to the onActionEnd function? ghazanfar Vizard 1 03-22-2007 10:25 AM
timers and director function Jerry Vizard 1 06-22-2006 09:47 AM function tavaksai Vizard 3 08-13-2004 11:05 AM

All times are GMT -7. The time now is 11:58 AM.

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