Character can sprint while crouched

hello to all friends, I’m new to this field, I have a problem how to make it so that when pressing CTRL, the character can’t run, only walk.

for example, I have 300 walks, I run at a speed of 600, press Ctrl and go at a speed of 150, and at the moment I press Ctrl and Shift, I run at a speed of 600,

how to do this in order to press ctrl in time so as not to run. and also walk at a speed of 150 or a little faster
alt text

I don’t know if i understand it correctly but you can use a branch on left shift input that checks if ctrl is pressed.
Also why do you use the event tick? You can put the Stand Up node to the “crouch released”.

There’s a function to crouch inside character default code and your CharacterMovementComponent has a MaxWalkSpeedCrouched variable to handle the speed.

To do this, you needs to enable bCanCrouch variable inside your movement component.

Or you can add a branch node before set max walk speed (Left Shift func) to verify if is crouching