Download

Should I use "play montage" with additional animations?

Hello! I’m trying to make additional animations like evasion, hit and others. But if I’m adding animation in anim bp and using “play montage” node, then my character is freezing on last frame of animation in case of spamming evasion button.
My evasion function:


My ABP:

I suppose this is happening because transition rule from evade to idle don’t have time to work.
I have tried to disable input while animation is playing but it doesn’t work.
Maybe, I shouldn’t use to play montage and just replace it with something like calculation of animation’s length and delays?

I was under the impression that the anim BP could manage which anim to play as long as you manage the player state correctly.

So, when the evading bool becomes true, the player should automatically play the evade anim, and you don’t need to use ‘montage’.

I could be totally missing something here…

You are right. But how to say that evading bool become false, so character can return to idle? With montage we have “On completed” pin for that purpose. I don’t know how to make it without montage(

You can open up your animation and step to the end of it to see how long it actually runs for in seconds and just do a delay for that duration and then set it back to false…

Already thought about it. Two problems:

  1. Play Rate is not affect on animation speed, so if i change play rate - my animation will breake.
  2. Modularity - if I’ll change animation (of course, i’ll do it in future) I will need to make it all again for every animation.

Maybe instead off of “On Completed” just pull off the regular output pin and set a delay for however many seconds/minutes and then set it to false. You shouldn’t have to adjust the play rate…

Strange, even with hardcode it doesn’t work, character still freezing in the end frame if I hit “evade” twice or more times.

And without “play montage” (with delay only) the same situation…

Well, I added default slot to ABP, so character is no more freezing, but now it’s constantly evading if I spamming evade button (

Looking a little closer, maybe because you’re using “Play Montage” it’s giving you the trouble? Not sure I haven’t used that node much, but I know “Play Anim Montage” works for me and also to fix the spamming issue just do something like I have in the screen shot. I excluded some of the things you have on your line of code for simplicity, but it should at least fix the spamming issue.

In that case character can evade in the air and anim bp state and transaction rules doesn’t work.