Triggering Animation Montage With Click or Button Press

I’m working with animation montages for the first time and have reviewed the documentation and a lot of tutorials to try to be able to trigger the animation montage to begin once I click the left mouse button. I am working in the first person game mode.

I have created a slot within my animation montage and have place an animation asset that I imported from Maya there. The issue for me comes with how to trigger the animation montage to begin because I don’t want it to automatically start playing. I have made an animation blueprint as well. Where do I create the logic that allows the animation to be triggered by a mouse click?

In regards to the animation montage specifically, is it best practice to have your notifies for various sounds in the montage or somewhere else?

Last question–if I want my animated object to trigger ambient sound when it’s in a certain area of the scene, that’s the best way to do that? Is it with a notify, a blueprint of a different, static object in that area, or the blueprint of the moving object itself?

Made an example for you:

Where AnimMontage is a variable of the type Anim Montage.

When it comes to sound, I prefer notify. For sounds you can make an already defined animation notify that plays a sound, very simple. Works very nice for adding footsteps for example, you can make animation notifies for left foot, right foot etc so it plays a sound each time the characters foot hits the ground.

For any sort of custom event, I make an animation notify, call it via “Cast to [Character Blueprint]” in the animation blueprint, then make a custom event in the character blueprint which the animation notify can then call on.

Thank you! Where did you make the blueprint in the picture? Was it in an animation blueprint? That’s part of using montages that I’m still very unclear about.

Oh gotcha. I will be playing montage sections. My issue had been connecting all of it together to give it the ability to be triggered within the game

Right. I will have a string of animations I want to play sequentially but right now I just have one. Is the character blueprint just a blueprint that I attach to the object that I modeled and imported from Maya?

This is in the character blueprint. You could do it in the animation blueprint as well with some adjustment, but I find this easier.

If you are playing montage sections then the animation blueprint would be more appropriate.

If you are having problems with animation blending when playing your animation that can be resolved by blending in the animation graph section of your animation blueprint, by using different slots for the animations.

Montage sections are generally more useful for sequential abilities. Ie, attack1 attack2, attack3 going straight into each other by the same button press.

For something like that you would use animation notify to either chain the ability to a new animation, or loop the current ability, and “Montage Set Next Section” in the animation blueprint.

A character blueprint, pawn blueprint etc is for a skeletal mesh with animations. If you have a simple object like a static mesh rotating or something like that, there are better and more efficient (and fun) options.

Well, without knowing exactly what it’s doing, it’s hard to say what the best solution is.

Ok got it. What I have is a simple sphere that moves around–nothing super complicated

The sphere basically just moves around the space and changes height a bit. It’s not a character and does not have any moving parts.

Ok. Why are you using animation montage for that? Are you using montages to move it?

I will have multiple animation assets and lots of sound notifies so I figured using an animation montage would be the easiest way to do all that and have it be able to be triggered by a mouse click to start the sequence of animations.