I am setting up an input remapping menu, and I am having trouble getting it to listen for a key. Right now I have it set to change a “ListeningFor” variable to “Jump”, wait 4 seconds, then change it back to “None” when the “JumpRemap” button is clicked. My thinking is, I have OnAnyKey, then unless “ListeningFor” is equal to “None”, then whatever “ListeningFor” is, set that input action to the key that was pressed. However, I can’t figure out any way to have input recognition like that. Thanks in advance!
Have you tried the input key selector, this is what it’s for:
Oh, I didn’t think of that! Thank you!
How do I tell it which InputAction to map?
This node only give you the key, you then need to apply it with
Try:
Okay, I am very new to all of this and have no earthly idea what BreakInputChord is, but I will copy what you have. Thanks!
As you can see, it breaks the input key down into which key is was plus which modifier keys were also held at the time.
I think it’s covered in the vid…
How do I tell it to replace the mapping instead of simply adding another one?
You have to look at what they typed, and see if it has changed.
So I have a bool for wether or not the mapping is different, then presumably a branch, and then what? I don’t know what to do to actually do the removing, because RemoveInputActionMapping requires a key to remove, and GetInputActionMapping by Name puts out an array instead of a mapping, so I cannot simply get it, then remove it, then add another.
Thank you!!
When the player comes into the menu, you have to store the current action key in a variable.
Then when they click the input selector, you have to see if it has changed. If it has, you then clear the current action mapping and put the new one in.
I have it in two macros like this:
Inside, they are:
So how do I get to what it was set as previously? I can’t find a node for “GetActionMapping” or anything similar.