Download

Using montage to blend between animation states

My anim blue print has idle/run, jump, crouch and prone states. What is the best method to use a montage to blend between the states (Ex. Standing to prone) while allowing the anim blueprint to transition to the correct state?

Ex.

  1. My character is walking and currently in the idle/run state in the anim blueprint.
  2. The prone key is pressed.
  3. Begin the “transitional” montage.
  4. Set a variable in the anim blueprint that causes the transition from idle/run to prone.
  5. The anim blueprint transitions from idle/run to prone.

The problem is when do I trigger the transition. Does anyone have any recommendations/insight?

Tried method 1: Using the steps above, even though the montage is triggered first, there is still a “jerk” as the anim blueprint transitioned while the montage was starting.

Tried method 2: Changing the order a little, place steps 4 and 5 in the OnMontageEnded event of the montage. There is now a jerk after the “transitional” montage completes.

Tried method 3: Anim notifies. This worked. However, gameplay is now dependent upon notifies that may not fire if the montage is interrupted.

Thoughts?

This last is my approach for handling weapon equip animations that cover the transition to the weapon-hold states. If you’re worried about notifies “maybe not firing”, do what I do: use NotifyStates instead.

Take whatever logic you would normally put into a Notify, and instead put it in the NotifyEnd function call of a NotifyState. Then, set the NotifyState in your animation such that the end is where you want the notify to fire, and the beginning is at frame 0 (or wherever you want the notify to be “uninterruptible” from). In ordinary gameplay this will be indistinguishable from a standard notify. But once a NotifyState starts, it ALWAYS fires its NotifyEnd no matter what; so if the animation is in some way interrupted by something, as soon as the transition montage’s weight is too low to fire notifies, that NotifyEnd will immediately trigger.

If you’re going to put gameplay logic inside notifies, I recommend using NotifyStates wherever possible. You avoid a lot of cases, like the ones you fear, where an unexpected animation interrupt or blend causes some critical state change to not fire correctly because the animation was blended out too far. As a rule, I only ever use regular notifies for cosmetic/FX things (sounds, particle effects, etc) and use NotifyStates for any gameplay logic tied to frame data (hitboxes, input buffers, state changes, etc) because they’re more “reliable” in a gameplay sense.

Anim notifies will miss fire.
Basically, that’s also a flawed concept. (I once used it for jump stuff. Should never have even tried it).

First let me ask this.

Why do you want to use a montage to transition between states?

Let’s assume the following setup.

Base locomotion state machine. Walking and running plus jump (the mannequin).

Prone state machine. Whatever prone states need to do.

within the base locomotion you can call (paste?) The Prone state machine.
before transitioning into said state machine, you can play a pose to Prone animation.

You can acrually granularly control how you get into Prone by allowing transitions from different states.
ei jumping should not be allowed to transition to Prone.

Second. Since you already have it all setup with a montage.
the montage has an output pin for the time of the animation.
I’d take that and set the variable to change based on it…​​​

Basically put a .02 sec delay after the montage and set the abp value.

the montage will always play and completely cover the transition.

Third. If I were you I’d go back to 1 and set it up inside the animation BP so that even AIs can use it without you having to recode the AI specifically for it.

when Prone is triggered you transition first, then have access to the Prone states.

@RhythmScript @MostHost_LA Thanks for the responses. I have a good idea of which route I’ll take now.