ANimationControl, is current animation playing on a channel?

Hello guys,
Maybe i’m taking a wrong approach, but I was wondering if it was possible for a given animation name to tell if an animation is already playing on a channel?

What i’m trying to do :

when the user presses a button, an animation is triggered, what I dont want is to reset the currently playing animation if its the same as the one the user has triggered.

so is there a way to tell if the animation is already looping on a channel? (any channel), because I create a new channel for every animation.

The wiki animation tutorials cover this I’m pretty sure.

well if you are referring to this:

[java], public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) {
if (animName.equals(“Walk”)) {
channel.setAnim(“stand”, 0.50f);
channel.setLoopMode(LoopMode.DontLoop);
channel.setSpeed(1f);
}
}[/java]

it’s not what I want…this only gets called at the end of an animation cycle. I want to know what animation is playing independently of the listener, directly from the animationControl…

since I create animation channels dynamically, I was wondering if it was possible to know if walking animation was currently being played on all the cha,nnels…

You need at least one channel to play animations. To see what animation is playing is animChannel.getAnimationName()

alright, but is it possible to get the animation playing without knowing on which channel it is played?

you could iterate over the channels and check all of them.

but youre likely not setting up your code very well if youre trying to do that…

each channel should probably only have related animations on that channel (For instance a channel for leg animaitons or for head animaitons). You shoulnd’t have to check all your channels to see if “legs_Idle” is being played. you should just check your legs channel to see if “legs_idle” is being played and play it if its not.