One of the problems I ran into with the keybinds that I did not foresee, was mapping the same key to multiple actions. When this would happen, pressing the key would do all of the actions that it's mapped to. Obviously, this isn't ideal and would give the player a bad experience. To fix that I had to loop through all of the input action strings to see if there was an action that already had that keybind and if so remove it from the action as you can see in the first option in the sequence.
After that was fixed I found that even after doing that, I noticed even though the key was removed, it was still displaying the old keybind making it look like the key was still mapped to the old mapping.
To fix this I had to go inside the blueprint that held all of the keybinds and loop through all of the children of the scroll box that held them and updated their keys every tick which shouldn't have any performance problems because it only ticks when the keybinds are being displayed.
This solved the problem and now the keybinds switch to None immediately when the key has been remapped.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.