How do I play a full animation, without cancelling it when I press a button again?

Hello!

I am trying to find out how to play an entire melee animation animation, without cancelling it when I press whatever button I have assigned it to? At the moment I can for example spam click RightMouseButton and the melee animation will reset mid way and play again, which is not what I want. I want it to play the full animation, and then play the animation again if I have pressed the button, like Torchlight or Diablo.

I am also trying to figure out how to switch between two different animations when I press the RightMouseButton, for example when I press RMB the first time the character hits with his right arm, and when I press it again he hits with his left arm? Hope anyone out there can help me!:slight_smile:

Not sure if I explained it clearly enough, so just ask if there is anything that’s not clear:)
Thx!

bump for interest.

Hey,

I’m sure there are multiple ways to handle it, one way which I’ve experimented with is by using the Get Current Montage node and Branching based on what montage is playing:

In essence, you press a button to attack - checks what the current montage is and if it’s already playing the attack montage, don’t execute it again.

Should give you something to work with.

Also… check out this section for help with [Montage Branching][2] for your left/right attacking request, there is an excellent example showcased here.

-W

1 Like

thx alot!! Got it to work:) Now I only have to find out how to switch between playing two different animations with the same button pressed.

Maybe you can a a multiple slot name in 1 montage, and u can random slot name every time you pressed the button, and it will play different animation each time when u call Play Slot Animation