How to desable especific key inputs in blueprints?


I have done this for multiple states like sneaking, crouchin, runnig etc… it kinda works, but if I`m pressing (ctrl) for prone and at same time i press (C) for crouch it doesnt do the crouch animation but it stats to flinch, even if i say it cant crouch, it still tries to do it when I press the crouch key.

So my question is: is there anyway in the bluprint to disable inputs from certain keys like (C) while im pressing (ctrl) for example, so the engine doesnt try to do the animation?

Flow logic control … Branch checks

On Press → Can I do this (Branch check) → TRUE: execute, FALSE: Do Nothing

its what i have, as you can see in the image, in every state i have : on press----can do this?-----if tuee----it cant do this or this or that.

on realease-------it CAN do this or this or that.

But if i dont realease the button to prone and press at same time the crouch button it starts to flinch

You have to branch check against all states that you want to have prevent the action from executing.

Crouch key :
On Press → (IsProne? NOT, OR IsJumping? NOT, OR IsFalling? NOT ) Branch: TRUE → Go Prone, Set IsProne? (true)

Prone Key :
On Press → (IsCrouched? NOT, OR IsJumping? NOT, OR IsFalling? NOT ) Branch: TRUE → Go Crouched, Set IsCrouched?(true)

For these two particular actions you’d typically allow for an override.

e.g. currently crouched, press prone → set crouched to false, set prone to true → go prone. vice versa.

edit …

Something like this.

I got the problem fixed by giving up the on release option (something like you shown), and now all states are a toggle and untoggle instead of pressed and release wich is a shame because I wanted it to be a press and release. I think it was the “on release” part that was causing the fliching. I just wish there was a option to really desable a specific key input like the “disable inputs” node but for a specific key, a way for the engine doesnt listen at all a certain key input, because with the method i am using and the method you guys show the engine still listens to the key input.

on button released put a an if statement to check if is proned is true if not don’t do anything if true execute the rest of the code. this will recreate the same effect as disabling the input.

u can also create an enum to determine the situation the player is currently at like proned, crouched, running…

You could change “CanXxxxxx” for “IsXxxxxx”
and just turn the prone true and false (in this case)
To know if you can do prone you just have to ask the rest if they are false

check my ungly draw

You still need to do on release logic to reset the state to false.

Prone release:
IsProne Branch (true) → Set to False

Crouch release:
IsCrouched Branch (true) → Set to False