Don't do other animation when a animation is playing

i want to the character don’t do other animation when a animation is playing.
There are two example

1)(For example:my character have two skills which are punch and kick)
but i don’t want the character can punch and kick together,i want the punch cannot do when the character is kicking or the kick cannot do when punching

2)(For example:my character has only punch skill)
But if i press punch skill again so fast,it will start the animation again but the animation is not yet finish.So how can character avoid punch again when the punch animation finish and not the animation playing?

HELP ME~~~PLZ~I am a NOOB

Help plz~~~~

You need to learn more about AnimState and more specific montages. Check out the videos on the Unreal YouTube channel especially this playlist: 3rd Person Game with Blueprints (pre. v4.8) - YouTube

There’s 22 videos in that playlist and all will teach you what you need but if you only want to start with AnimState then start at this video in that playlist: - YouTube

That one starts with Anim Montage and as the videos progress will teach you exactly what you need to know for this question.

Hope this helps! If it does please do me a favor and accept the answer by clicking the check mark located below the arrows next to the answer. When done correctly the answer will highlight green. Thanks and good luck!

I watch it already but it only teach how to make the character punch , the character can punch again so fast but the animation is not finish yet but i want to know how to make the character cannot do the animation again until it finish punch. Do you know how to make?thx

There’s two ways I can think of… One is set a notify at the beginning of your animation that’ll set a bool to true when started. Add another notify at the end of the animation that’ll set the bool to false. Then branch off using that bool.

Or you can use Montage Is Playing Node. Which is exactly like IsFalling node. It returns a true or false value depending on if that montage is playing or not. You might have to turn off context sensitive to find it.

Hope that helps.

i will try~@_@ it looks hard…

You could add a new variable in your Character Blueprint (for example, IsPunchingAllowed) that is set to false when the punching animation starts and false when it ends. Use AnimNotify events for this: React to the event in the Animation Blueprint and call the SetIsPunchingAllowed function in your Character Blueprint.

In your Character Blueprint, add a condtional branch before setting the IsPunching variable to check whether punching is allowed right now.

You’ll want to set the IsPunchingAllowed default value to true. Otherwise, you’d never be able to start punching.