Interrupting an animation ipo

I have an drum with a transformation animation ipo on it (stretch on z, x, y axis to look like it is bouncing on impact of a drum stick). When it receives a message saying “beat”, it is supposed to run the animation (which is 20 frames long). However, sometimes it receives the message but does not show the animation. I don’t know why this is happening and I would like some direction.

My guesses are:

  • The drum is still bouncing from its previous animation and ignores the request to play the same IPO
  • However, there should be enough time (I have tried 3 seconds) for the previous call to play the IPO to complete before I send the message to play it again.
  • The message is getting lost somewhere.
  • Don’t know if this can happen. I suspect it can’t, that the cause of the problem is instead a logic mistake on my part. Implementation details:
  • I have a message sensor hooked up to an AND controller which goes to the IPO Actuator that "Play"s frames 1 thru 20.Thanks in advance,

you should post the blend…then someone can play with it. Try shortening the ipo, make the stretch happen in 10 frames instead of 20…

What happens if you increase the blend factor in the ipo actuator?

Hmm, I have this working, but I am not sure why. Here was what I did.

I had the animation performed through adding an active actuator in python.

import GameLogic as GL

cont = GL.getCurrentController()
if cont.getSensor("self play").isPositive():
    import logging
    logging.getLogger('game').debug("Animating drum")
    bounceAnim = cont.getActuator("Show Bounce")
    GL.addActiveActuator(bounceAnim, 1)

And suddenly this works. Its maaagic!