The state:
The transition rule from WeaponAction ==> Idle/Walk/Run:
The StateMachine:
The problem is mostly that I cannot use execution pins inside a transition-rule to ‘switch on the enum’ and I can’t use TimeRemaining() to figure out if the animation is done playing because I do not know which one is playing.
Technically I could just not use an enum there and instead use a separate state for each “weapon action”. But this would require an ENORMOUS amount of states (number of weapon-types multiplied by number of animations per weapon = a lot) and thus an enormous amount of transition checks. So I would really prefer to use the enum, if I could only detect when the “weapon action” finishes playing the animation so I can return to the Idle/Walk/Run state. Or some way of detecting when to return to Idle/Walk/Run somehow?
Using a variable (of type Animation) instead of that enum would also work. Then I would assign the animation to the variable in the eventgraph and then just use that variable in the state and in the transition rule instead. But that too does not seem to be possible.