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.