Calling animation

Hey i am using a movement set very similar to the roaming _ralph sample and wanted to add another animation for the spacebar release (a jump animation).

The problem i am having is I am unsure of how to tell when the jump is finished so i can continue the idle animation straight aftwards, i have tried multiple things but was unable to get any of them working. So what i want to know if how can i make the program flag a variable to true while the animation is going and false once it finishes or something to the same effect

The easiest way if you’re not using intervals is to calculate how long the animation plays, and use a doMethodLater() to trigger whatever you like when the appropriate amount of time has elapsed. The number of seconds is of course the number of frames divided by the frame rate.

Or, you can use an ActorInterval within a Sequence, and place whatever operation you like following the ActorInterval.


Worked great! thanks :smiley: