Pandai: Change animations when path completes

I am using pandai to move the player’s character when a click is registered. I would like to change the animation from ‘walk’ to ‘stand’ when the character arrives at the end position.

def pathTo(self, x, y, z):
  self.behavior.addToPath(x, y, z))

Is there some function that I am missing that would allow me to hook into a completion event?


Some times ago I have resolved this with a help of aiBehaviors.behaviorStatus(string AIName) method (see … _Behaviors )for checking state of used behaviours. On mouse click behaviour is started + a task for continuous check of status.

Maybe this will help if not too late :slight_smile: