View Single Post
  #3  
Old 03-22-2007, 09:17 AM
ghazanfar ghazanfar is offline
Member
 
Join Date: Mar 2007
Posts: 11
Do you know how to send a value for 'pool' to the onActionEnd function?

We are trying to use the function in this function:

if (ag1=='a1' and ag2=='a3'):
walk_over = male.walkto(meetingpoint[0]+1,meetingpoint[1],meetingpoint[2])
#This line calls that animation.
male.act(walk_over)
walk_over2 = male1.walkto(meetingpoint[0],meetingpoint[1],meetingpoint[2])
male1.act(walk_over2)
viz.callback(viz.ACTION_END_EVENT,onActionEnd)

And the onActionEnd function currently looks like this:

def onActionEnd(obj,action,pool):
if obj == male and action == walk and pool == malemale1:
pos=male.get(viz.POSITION)
pos2=male1.get(viz.POSITION)
rotate_degrees = vizmat.AngleToPoint(pos[0],pos[2],pos2[0],pos2[2])
male.rotate(0,1,0,rotate_degrees)
male.act(5)
Reply With Quote