My team and I are making a game in which we have characters that use attacks and abilities. We have set up a number of actors, motions, and an animgraph to drive the logic for using these attacks.
Several of our motions have been given a TwoStringEvent called “effect”, which is fired when the attack logic should execute. This is the frame when the arrow is loosed, or the sword would pass through an opponent, etc.
Players often like to change their mind during an attack and use a different one. Some of you may know this as “animation cancelling”. Our animgraph will blend their character from their current motion “A” to the new one “B” over 0.3 seconds.
However, while blending:
the “effect” event from motion “A” will still fire!
This typically causes the logic for attack “B” to execute, without having the usual wind-up time. This issue is especially pronounced with attacks that have a large wind-up time.
We cannot give each motion a different “effect” event name to distinguish which one we listen for, as sometimes actions share a motion (attacking with ice arrows versus acid arrows).
It is not clear to us that there is a solution to this without modifying the emotionfx gem. Our plan would likely be to add an option to control whether an event can fire while the motion is being blended out.
This seems like a straightforward use case, so I would like to know if there is a known workaround. If not, I would like to know if there are plans to create one, or best advice on how to proceed.