Using Animation Montages

Choose your OS:

After creating a Montage and editing the Montage, you will probably want to play your Montage at runtime. You can have your Montage automatically start playing by assigning it to a Skeletal Mesh or, for more flexibility, you may want to set up a Blueprint Script or C++ code that will call your Montage or Sections within your Montage to start playing based on gameplay conditions.

Using Anim to Play on a Skeletal Mesh

In the Details panel for a Skeletal Mesh, you can set the Animation Mode to Use Animation Asset and the Anim to Play to your desired Animation Montage.

SkeletalMeshMontage.png

At run time, the Skeletal Mesh will playback your selected Animation Montage automatically.

Using Blueprint's Play Montage Node

You can call the Play Montage node within Blueprint (below we tell a Skeletal Mesh called Mesh to play a Montage when the character is clicked on with the Left Mouse Button).

BlueprintMontage.png

The Play Montage node enables you to not only select what Montage to play but you can also set the Play Rate, Starting Position and Starting Section as inputs.

On the output side, there are several callback events that you can use to trigger other script based on the state of the Montage:

  • On Completed - called when the Montage finishes playing and is fully blended out.

  • On Blend Out - called when the Montage is starting to Blend Out, using Blend Out Trigger Time or if the Montage ends.

  • On Interrupted - called if the Montage is starting to Blend Out, due to interruption by another Montage.

  • On Notify Begin and On Notify End - are callbacks when using either Play Montage Notify or Play Montage Notify Window Anim Notifies in the Montage asset.

    • These Anim Notifies can forward an additional Notify Name to differentiate between multiple callbacks from the same Montage.

In order for the Montage to play, the Skeletal Mesh will need to have its Animation Mode set to Use Animation Blueprint and the Anim Class pointed to an Animation Blueprint.

SetupAnimMode.png

Inside your Animation Blueprint, on the AnimGraph, you can use the Slot node to define which Slot from the Montage you want to play.

AnimGraphMontage.png

See Using Layered Animations for another example of how a Montage can be used inside of your Animation Blueprints.