State Machine skipping to idle

Hey guys I’m working on making a simple game using the paragon character Countess. I want to get practice working with logic and understanding state machine better so I am creating all the blueprints for the character from scratch.

I have one state machine that is used for idle, running and jumping animations with the swords out and also with the swords sheathed. (I’m beginning to think maybe I should split these up into two different state machines?) And then I have a series of animation montages that are blended in. My issue is when ever I attack while stationary after the attack She plays the unsheathing animation and the state machine switches back to that state. I cant figure out why exactly this is happening.

Is there anyways I can work around this or can anyone help me figure out why this is happening? Sorry if this is more vague than it should be. Thanks for your help!

Hey man, it’s a little complicated to understand but…

I recommend doing everything in the same state machine.

  1. As your default state, I would make a blendspace 2D which should include your Idle / Walk / Run / Turn Walk / Turn Run.

  2. You said you have blended montages. You will need to make quite a few here i think. and for the sake of not typing an essay here i will post a great link for you and give you some info on what you need to achieve by following it.
    You basically want to setup your sheath / Unsheath animations so that only you’re upperbody or arms play that animation while still using Idle / Walk / Run on the rest of your body. you do that with montages. This video will help: BP 3rd Person Game: Animation BP Punching Setup | 18 | v4.8 Tutorial Series | Unreal Engine - YouTube

  3. Then all you really need to do once you have all the montages setup and prepared is set key inputs to activate each animation like the unsheath, sheath, attack, block etc.Then make sure your notifies handle when to start and stop each animation.

Hope this helps!
Kind regards!

Thanks yea i know my code is a bit jumbled and hard to read. yea i should clean up that walk/ run to just be a 2D blend space.

ok so if i understand correctly you are saying take out the sheath and equip states and just have them as animations and blend it just the way I did with the attack animations? kk sounds like a plan I’ll try that out thanks

So I ended up taking out the “equip” and “sheath” states and just added a play montage node to the input that I have for equipping and sheathing the swords. It was really strange though because the montages weren’t playing at first, I needed to make a whole new montage for them to . I think it had something to do with the slots that the montages were set as… but idk what because both times I had it set to the default slot…well anyway thanks for the help.