Currently I have this setup to add run/walk/sprint to my character:
But is there a way to do this through input mappings? Or is the above the way you are supposed to do it?
Currently I have this setup to add run/walk/sprint to my character:
But is there a way to do this through input mappings? Or is the above the way you are supposed to do it?
Hey @themoon777us!
No, this is how you are supposed to do it! Input mappings are really just a named event, not a function, so they can mean anything. It’s all in the code afterwards. Same with Advanced Inputs.
Thank you for replying back. I did it like this instead but I don’t know that is is much different really other than making an EIA for one action. Seems kind of… silly to me to do it this way though. Unless I’m missing something?
For a simple binary action like toggling sprint, the main benefit of using mappings vs the raw key events would be if you want players to be able to edit the keybinds. Otherwise, Started and Completed pins on enhanced input events are pretty much the same thing as Pressed and Released on raw key events here.
So in the above example I would not need to add triggers in the EnhancedInputAction then? (I currently have pressed/released there). I wasn’t sure how to use the EnhancedInputAction to trigger a sprint.
The Triggered execution pin is mainly for axis type inputs, or other actions you want to fire roughly every frame (like a flamethrower weapon or something) while a button is pressed. For a quick toggle, yea, Started and Completed is all you need.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.