State in statemachine keeps triggering after montage

Hello,

I have an issue where a state in my animation blueprint state machine keeps getting triggered without the required input.

Basically:

  • I have an animation for drawing a
    weapon
  • The condition for the transition is
    “weapon active ON”
  • This condition is being set via my
    character blueprint, where pressing a
    key activates the variable “weapon
    mode”, which then I then grab in the
    animation blueprint event graph by
    “Cast to character blueprint” → Get
    weapon mode which then goes into Set
    “weapon active ON”.

This part is fine, tested with prints, nothing unexpected.

I have an animation montage for firing said weapon. When that animation montage has been played, it goes back to draw the weapon, ie the transition rule gets activated after the animation montage has been played. This is the part that doesn’t work.

Have tried:

  • Bypass variable via character BP
  • DoOnce nodes
  • Using a splitter entry node (very
    unelegant solution where the actor
    upon beginning play will play the
    draw animation and then go to its
    idle, unarmed state). While this one
    works, it is not ideal.

Anyone have any suggestions for workarounds? Basically what I need is something that prevents the “Draw weapon” state to repeat after playing the animation montage.

As a side note: I have another weapon I can draw with a different button. This weapons draw/stow animation is never activated out of turn. They have equivalent transition rules.

Going to gently bump this with a better explanation of the problem. Since my animation graph is pretty messy I’ve included an image below to explain what is going on:

So the problem as mentioned is that after any attack animation the character goes back to the “draw weapon” state before going back to “combat stance”, ie the red arrow in the picture. It should go back directly to the combat stance but doesn’t (attacks are played via animation montage in character bp reliant on button press).

There is nothing in my character blueprint that should cause this, and there is no notify event on the attack animation (used as animation montage) that should cause this to occur. And there is no transition rule from “combat stance” to “draw weapon” either.

Really at a loss here, wondering if anyone has encountered this problem before?

I’ve even tried adding an empty transition between combat stance and draw weapon, it still keeps repeating the transition state.