My input keys not working

I had added an action map and added a keybine of tab to it, and made a whole script for it, I copied the code from a youtuber and it still didn’t work, pls help

How can we tell why it’s not working if we can’t see it…

Consider posting the script and the intent behind it.

it is meant to make the player sprint when they press tab

What you’re showing should work as is. Things to double check:

  • does the input fire
  • do the variables hold correct values (Walkspeed, Sprint Speed)

Could you confirm the above?

it has the correct values, but what do you mean by “does the input fire”? Sorry for the trouble I am very new to unreal engine

Place a Print String node after the functions, do you see it print Hello in the upper left corner as you play and mash the tab key:

nothing happens, it may be a problem with my input settings

Do you use this Input action anywhere else:

  • some other actor?
  • in the LevelBlueprint?
  • perhaps you have more than 1 character?
  • or perhaps you do this someplace else:

348558-screenshot-1.png

Is there a reason why the tickboxes are ticked here?! Untick them. You surely do not want to hold 4 keys to sprint, no? Sounds like carpal tunnel with extra steps to me. And if you’re not on a mac you may not even have the Command key to start with (although it probably doubles as a ctrl under Windows OS).


Anyway, I’d like to think these were ticked by accident.

I have only used this action in my character
I have no levels created yet
I only have one character
I didn’t use it anywhere else

Holy crap thank you so much, my friend had told me that those were additional keys that you coulsd press

They’re modifiers that are supposed to simplify more complex scenarios:

348560-screenshot-2.png

Since it would be, otherwise, very difficult to press Shift + Tab simultaneously in the very same millisecond / frame.


And if you need the same Binding to work with more than one key:

348562-screenshot-1.png

Any of those keys would now trigger Sprinting.


Apologies for not noticing this earlier on, my bad.