How can I make character dash to a different direction during montage playing?

So, normally I can dash to the direction based on WASD input, but during montage playing, my character could only dash to the direction that the character is facing. For example, if the character is playing a montage of slashing his sword towards his front, even though I press S and dash, my character can’t dash backwards, rather, he dashes forward still. BTW, I’m using montage for dashing as well. Could anybody explain the problem to me? Much appreciated ;D

You can simply check whether the montage is playing and use the appropriate branch nodes.
This check can be done like so:

I would highly recommend putting this in a function and combining it with a custom enum in order to avoid having to find the exact montage every time. You can just map the relations in here and get an easy dropdown in the function.


image



image

It’s under blueprint in case you didn’t know:

thank you sir, I think I at least know where to dig into. Basically I can play different montages using enum right? Do I need to prepare different dash montages then? Like, dash front, left, right, back, 4 montages?

I’m not sure we’re on the same page…
You’ve played a montage (ie slash front) and you want to not be able to dash anywhere but the direction of the slash (ie slash front → dash front) during it. To do this, we check whether that montage is playing. We make this easier by creating an enum and function to check without looking through every montage for the right one.

You can just dash towards the directions however you dash- no changes needed.