![]() |
|
#1
|
|||
|
|||
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) |
#2
|
|||
|
|||
You probably won't need to worry about the pool parameter. When you add an action, you can specify a pool number. This allows you to execute actions in parallel by adding them to different pools. The default pool is 0.
|
#3
|
|||
|
|||
OK thanks we understand this function now.
We have decided to solve our problem otherwise. We created a timer that would count every step, and every 5 steps the next step would be done. This way, we could say that the avatar had to turn 3 steps after the walking action, and also give the other avatar to turn to as a variable. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|