Third Person character Attack while Run blend animation only when it is moving

Hello everybody !

How can I blend those animations but only when the character moves ? So if the “Speed” variable is 0.0 then do the attack animation normally (without blending).
I can do the blend animation based on the official UE TPS tutorial video but it makes the character’s leg looking weird when it just stands and not running, so that is why I want the blend only when the character is moving (when the legs are in step animation).

Thank you very much guys if you can help me !!

First, Go to the point in the event graph where your setting the boolean value controlling the attack to true, and add this (AttackStartPosition is a variable i made).

then go to the Anim graph, and go to the Attack state that you made
In mine, im using a layered blend per bone to blend the attack state with the movement blendspace. it uses Spine_01 as the bone to blend, which will not affect the legs from the blendspace but will use the attack animations from the arms.

Then to ONLY use the entire attack animation if the movement speed of the character is zero, The node that you want is called blendByBool. This will ignore all the other blending stuff and just use the regular attack animation.
HOWEVER, every time it switches between the regular attack animation, and the blended one, it restarts the animation completely, which looks super weird.
If you click on the animation in the graph there will be a checkbox in the details panel that says Start position. that will you can plug that AttackStartPosition variable from the event graph in there and then it will work swimingly.

also this doesnt really use whats in the pictures up there, but can also help UE4 Melee Weapon tutorial Part4 - YouTube