View Single Post
  #2  
Old 08-26-2005, 12:12 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

There are many ways to do this. You can get the duration of the animation and then setup a timer to go off in that time. Or you can use callbacks to detect when the action has finished. Here's an example of using the callback method:
Code:
import viz
viz.go()

male = viz.add('male.cfg')
male.translate(0,0,5)

action2 = vizact.animation(2)

male.add(action2)

def actionend(obj,action,pool):
	if action == action2:
		print 'Action 2 is finished'

male.callback(viz.ACTION_END_EVENT,actionend)
Reply With Quote