How could I make in-game configurable controls? I’d like to have it in my game so player won’t be forced to use my controls as controls that are convenient for me might not be convenient for someone else (example: Someone might like to use CTRL to fire instead of space as I prefer).
I’d like to support both keyboard and joysticks.
Saving is not an issue, only getting keys, can someone help?
You can store the keys codes in variables, and then uses the “Key is pressed ( Text expression )” condition which takes a string as argument, like this:
Key VariableString(UpKey) is pressed
if we consider that the key code to go up is stored in variable UpKey.
The key code are strings like “RControl”, “Return”, “Space”, “a”, “b”, they are identical to the “Key is pressed” condition usually used.
For now there is no way to get the string representing the latest key pressed ( It would be handy to offer the player to use any key he want for any action ), but you could offer to the player the choice between 2/3 different keys for each actions.