Disable Input Not Working Properly?

Hello there,

I’m having some issues with my “Disable Input” nodes. I’m likely using them incorrectly, but I’m having a lot of trouble and would really appreciate help.

As may not be suggested by below image, here is what I’m attempting to do:

I have several different box triggers or volume triggers to interaction with my level through level blueprint. “F” key is only keystroke used to interact with these different triggers. As player enters trigger, their input is enabled for that single trigger. Once F is pressed, their input is disabled until later of following happens: they leave box, or animation finishes running. Once animation is complete and or they’ve left box, they can press it again for a new action.

That is what I want to happen.

As of right now, based on level blueprint below, once player enters in trigger, their input should enabled, and then disabled immediately after “F” is pressed. But that is not case. player can press “F” key as much as they want, as it does not look like their input has been disabled. Also, it affects all other triggers tied to F key.

Also, and even more importantly:
How do you ensure that “F” pressed only effects trigger box you’re currently in? Right now, pressing F while input is enabled in any of trigger boxes will active anything in level blueprint that is tied to an “F” key press. For example: if I hit lightswitch on one side of room, it will activate all of lights assigned to an “F”, not just those that are tied to trigger box.

I really appreciate any help anyone can provide.

Hey ,

Most of your troubles stem from having all this in your Level Blueprint. Anytime F is pressed, it interacts with anything in level that accepts that input. Generally, it’s a better idea to leave anything out of Level Blueprint that can be done elsewhere. For something like this, you have a few options that should work for you.

  • Put your enable/disable input and keypress in Blueprint for Actor that’s being interacted with. So in example of a lightswitch, use lightswitch BP and it’s trigger box to enable and disable input for PlayerController overlapping it:

Then use F Input node inside lightswitch BP. In this case, F input will only affect lightswitch Actor that is allowing input from a Player Controller.

Hope that helps!

With a little bit of math, I was able to get object blueprints working properly. Thank you very much for suggestion!