So far, I’ve managed to add modifiers to the entire Input Action or all of its keys using node like Break Player Key Mapping, but I can’t figure out how to apply a modifier only to a specific key slot (e.g., the 3rd key bound to the Input Action).
Forgive me if I’m not properly understanding what you are asking, but if I do understand then you will need to do it within the Input Context rather than the Input Action itself.
In the input context where you apply all your actions and then assign a key to them you can set the modifiers on a per key basis.
This will make the modifier only apply to that specific key that is performing that action.
I think it’s quite likely I am not understanding you properly though since you posted an image above that appears to be from the Input Context pointing out the modifier for that specific input. Please feel free to clarify if I’ve just told you information you already knew.
Thanks for the reply! Yeah, I understand that modifiers can be added per key mapping inside the Input Mapping Context (IMC) in the editor.
However, my issue is specifically about doing this at runtime via Blueprint where I want to apply a modifier only to, say, the 3rd key slot of an input action. I can already add modifiers to the whole input action or to all mappings, but I couldn’t find a way to isolate and modify just one slot’s modifier at runtime using Blueprint.
If you’ve seen this done or have any ideas how to get the existing modifiers for a specific mapping and update them via BP, I’d really appreciate it!
I’ve no experience with this but having done some clicking around, I found that you can cast to the modifier names (see below). Though, I haven’t worked out how to use these nodes.
If you extend an input action blueprint, you get access to all the triggers (start, end, completed, etc) and you can manipulate it from there. For example you can split struct pin and multiply a value with a variable that could be changed during some event.
This approach seems to apply the modifier to all key slots in the Input Action.
What I’m trying to do is only add or change the modifier on a specific key slot, like just the 3rd key binding in the action.
I managed to edit modifiers for the whole action, but couldn’t figure out how to target just one slot (e.g. Mapping[2]).
Thanks! I’ve seen that approach too, and while it’s useful for runtime value manipulation through events, my goal is a bit different.
I want to access and edit the actual modifier settings (like deadzone, scale, etc.) on a specific key slot inside the Input Mapping Context. not just adjust the output during execution.
Basically:
I want to target and modify only the 3rd key binding’s modifier in an Input Action.
Not affect all keys or just manipulate input results on tick. I need to actually read/write the modifier’s properties directly per binding.