Hi, I added movements to my character and now using AnimationTree. Here's the setup:

I got similar problems as before
1) To temporary stop moving while 'attack' animation is being played
2) To toggle Crouching (also temporary stop moving)
I haven't got around to play with StateMachine node yet but wondering if it can be done for now. Thank you
This is what I tried with code:
if is_on_floor():
# EXAMPLE MOVEMENT CODE
if Input.is_action_pressed("forward") && Input.is_action_pressed("run"):
direction.z += 1
runSpeed = 3
$AnimationTree.set("parameters/iwr/blend_amount", 1)
elif Input.is_action_pressed("forward"):
direction.z += 1
$AnimationTree.set("parameters/iwr/blend_amount", -1)
else:
$AnimationTree.set("parameters/iwr/blend_amount", 0)
#ONESHOT
if Input.is_action_just_pressed("attack"):
$AnimationTree.set("parameters/attackshot/active", true)
speed = 0
#TRANSITION
if Input.is_action_pressed("crouch"):
if pose == STAND:
$AnimationTree.set("parameters/standcrouch/current", 1)
speed = 0
else:
$AnimationTree.set("parameters/standcrouch/current", 0)
$AnimationTree.set("parameters/TimeScale 3/scale", -1)