How to stop Anim Montage Loop by using a keyboard key

Hi, I’m using anim montage to pick up a object from First Person view and this is not a combat game

So to break it down, If I press E key the anim montage will start and pick up the object and it will go into a held object animation which is the loop. While in the loop there is a dialogue mechanism that will be trigger and a dialogue choices mechanism.

I need a way to make the animation loop to stop and go back to idle animation when the player finish with the dialogue or any other method is welcome too. I’m still new to unreal please use easy words for me to understand. Thankyou

Just stop the animation. Example, where you press X to start the montage and C to stop it:

Is it possible if I use the same key? and how to make the idle animation triggered after the Stop Anim Montage function trigger?

Is it possible if I use the same key?

Yes. Use a flip flop - press once it plays, press again it stops:


and how to make the idle animation triggered after the Stop Anim Montage function trigger?

That depends on your state machine and BP animation. Do you even have them? What are you doing before the montage? If you have a state machine, then set the conditions of the transition to make the player go the idle, before or after the “Play Anim Montage” node. For example, in my case (third person template), if I want it to return to idle afterwards, I just need to:

315589-2.jpg

1 Like

Well this is my current anim stage

315604-locomotion.jpg

and this is my AnimGraph

The default slot is for the anim montage , though it is empty because I make a function/mechanic to call the montage in BP Actor

1 Like