How do i go Back to my Idle state after Animation Montage has finished playing?

How would i go back to my Idle_Walk_Run Blendspace once animation montage has finished playing? I am a newbie, i am fairly decent with animation montages but maybe something is missing? Any help is very much appreciated.

I will go through step-by-step on how i setup this animation montage.

Step 1: I went into my Animations folder, found the attack animation, Right-Clicked > Create > Create AnimMontage then assigned that animation montage to a slot called “MagicAttack”

Step 2: I went into my character blueprint to the event graph and setup a key action mapping and called that event, I then created a variable called “WindAttack” and on the “Pressed” on the WindAttack event i set that “WindAttack” Variable to true.

Step 3: I went into my Animation Blueprint to the State Machine that is holding my animation states for the player, I created a new state called “WindAttack” going from “Idle > Walk > Run” to “WindAttack” and back to “Idle > Walk > Run” state.
3.jpg

Step 4: I went into the Event Graph in the Animation Blueprint, I dragged off “As Exo Red Character BP” (Which is casting to my player’s blueprint, that is holding my variable “WindAttack” i then searched for “Get Wind Attack” and dragged off that and “Promoted to Variable” i then named it “WindAttackOnGround” and hooked that up to my other attack animation montage like so.

Step 5: I went back into my State Machine and clicked on the state “WindAttack” and dragged the animation and hooked up to Final Animation Pose Result.

Step 6: I defined the rule going from “Idle > Walk > Run” to “WindAttack” i dragged out “WindAttackOnGround” and hooked that up to the Result

Step 7: I defined the rule going from “WindAttack” to “Idle > Walk > Run” i dragged out “WindAttackOnGround” got the variable and dragged out and search for “NOT Boolean” and hooked it up like so.

Step 8: Final step - In my Anim Graph i dragged off my default slot and created a new default slot to assign that to my “MagicAttack” slot and hooked it up to the Final Animation Pose Result, like so.

So in any of the steps above, if i have forgot or missed a step or maybe i did something wrong, please help. My “WindAttack” plays just fine but when it is finished playing it stays at the end of that Animation Montage and wont enter the idle state. My first thought was "Maybe i defined Step 7 translation rule wrong, but i am clueless. Any help is very much appreciated.

Thanks in Advance,
.

1 Like

Does anyone have a solution for this?

You’d be better off not putting the attack animation in the state, let the locomotion state just handle locomotion and montages handle one off animations.

when you want the attack animation montage to play you need to call ‘Play Animation Montage’ and pass it your attack animation, that will then use that slot node to blend that animation over the top of the locomotion state. Then when it finishes it will return to using the locomotion state by itself as the montage is not playing anymore.

This way you can then play whatever animations you want when you want rather than having a single anim sequence in a state machine.

i was thinking. Maybe a notify would work? That way you can say that the animation has finished playing to disable the animation and enter the idle state.

yeah can do it that way.

just run the transition off maybe a bool, set it to true when it wants to play and then stick an anim notify at the end that sets the bool to false so it transitions back to the walking state.

I don’t think you even need that slot node in your anim blueprint if you’re calling the animation from the state.

I’d honestly go with not putting attack animations in the state though and using anim montages correctly, you’ll thank me later down the line :slight_smile:

plus, you’ve already pretty much got it setup to work in your anim blueprint already, you just need to call ‘Play anim montage’ from your blueprint and remove that attack state from the state.