Hold a few button

I greet everyone and ask for help, faced a problem, I don’t know how to implement in Enhanced Input, input capable of checking the retention of several buttons, everyone who will help, thank you very much!

Hey there @X-CompleX1! Welcome to the community! Depending on your use case you might want to either do this in blueprint or in Input Actions. If the two things you want held are separate input actions, then a chorded action is the way to go:

[Mapping Context]

However, if there needs to be more factors you may want to just check if either actions are operating at the time and set them to hold:

1 Like

Thank you very much, now I check, I will unsubscribe in a while

Thank you so much, it works! Only the first option is suitable for me, the second is not bad, but it seems to me that other IAs will interrupt it. And I understand correctly that if there should be, for example, 3 buttons in a combination, then you can use IA to combine 2, and then combine it with another IA through chorded?

I’d recommend for more than 3 inputs, especially if any of them are variables in BP and not IA to just use the BP route, there isn’t a limit to the pins you can add with an AND gate so go nuts. Chorded is also good since it’s at the input level, but best for single modifier keys like holder a trigger and pressing a button to do something else. Though these aren’t set in stone and you can do whatever you feel is best for your use case.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.