InputAction not deactivating after release of designated button

So in the picture in the red squared area, you can see I’ve set up a system for walk run and sprint. I want the walk anim to be toggled and that IS working properly currently.

However, the sprint button (connected to left shift) is working as a toggle as well, even though my intention is to have it be a press-release like most games are for a sprint anim…

Essentially, as long as left shift is held down, the characters speed is set to sprint speed, and when it is released it goes back to run speed.

Based on how this is set up what would be causing this?

Not sure seems like it should work in theory BUT, why bother with the extra branch node and check on movement state? You want EVERY time space is pressed for the player to sprint no matter what…and EVERY time it is released to go back to a “run”. So why not code that instead? You are giving the computer more places to create a weird bug. Just go from input action sprint pressed to “set movement state sprint” and on released “set movement state run”. Seems like it would do the exact same thing without that intermediate check on current movement state.

Because he will sprint from a walk if I don’t do the branch checks. The only way he can sprint is if the user has toggled off walk, and the character is now running. So he can only start sprinting from a run.

Im not so much concerned about that though as I am that the release of left shift doesnt do anything. It doesnt matter how I arrange things. Any ideas on that?

I don’t think so. Your sprint logic says

  1. On pressed Check movement state

    If walking → set to sprint

    If running → set to sprint

    If sprinting → set to run

  2. So say player was previously walking, they then press the “Input Action Sprint”, the branch will check the current movement state and see it was “walking” return a “false” and set movement to “sprint”. On release it is going to check movement state see “sprinting” and return true and set movement to “run”.

  3. I would put 2 print strings one after “pressed” one after “released” make sure they fire off appropriately there first

Let me know what that says.

Well I can tell you what happens in-game. If the char is walking and I hit shift/sprint he doesn’t sprint. Continues to walk as he should. I then hit Tab which toggles run on.
THEN while he’s running I hit shift which does in fact send him into the sprint, but when I release shift he continues to sprint.

I did just do that string check and you’re right, pressed pops up on the screen but no “released” when i release shift. So the system isn’t even detecting that I’m releasing shift?? Very strange.

By the way found out what this was.

I had checked the shift checkbox next to the drop-down box in Input settings while designating Left Shift as a button.

For some reason that checkbox makes it so when shift is released the system does not register it.