Hello everyone! Still learning about the new Input System, right now I’m having a very specific issue, but maybe someone can help me with it.
I have two different key bindings in my game, one of them uses Z and the other CTRL+Z. The problem I’m having right now is that hitting CTRL+Z will also trigger the Z action. Is there any way to prevent this?
I could hardcode a check in my Z action to see if the CTRL+Z input is on, but this wouldn’t make sense if the player remaps the controls.
What I ended up trying is to make a dictionary of actions and flags related to their modifier (Control, Alt, Shift) and then when one of my actions is called I check if the appropriate modifier keys are held down (or not) in order to actually do the action.
Feels a bit hacky, but I guess since this isn’t supported directly by the package, any answer is going to be a bit hacky.
Your right, weather it’s at interaction time or during execution it looks like it has to be handle manually : / a shame as all data are here for this matter to be handled automatically.
ATM the actions don’t yet prevent input on one action happening on another if one should preclude the other. It’s high on the list of things-to-add. In the docs, it hides under “Actions cannot currently “pre-empt” each other’s input”.
Found this project on another thread : GitHub - TRS6123/AginerianInput “you can use this to set up combos with unlimited modifiers with each modifier being negatable in the Input Actions window.”