x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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 the help.

As may not be suggested by the 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 the level blueprint. The "F" key is the only keystroke used to interact with these different triggers. As the player enters the trigger, their input is enabled for that single trigger. Once the F is pressed, their input is disabled until the later of the following happens: they leave the box, or the animation finishes running. Once the animation is complete and or they've left the box, they can press it again for a new action.

That is what I want to happen.

As of right now, based on the level blueprint below, once the player enters in the trigger, their input should enabled, and then disabled immediately after "F" is pressed. But that is not the case. The player can press the "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 the F key.

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

I really appreciate any help anyone can provide.

alt text

Product Version: Not Selected
Tags:
overlap.png (379.5 kB)
more ▼

asked Nov 29 '14 at 10:17 AM in Blueprint Scripting

avatar image

bnisbet
33 11 17 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey bnisbet,

Most of your troubles stem from having all this in your Level Blueprint. Anytime F is pressed, it interacts with anything in the level that accepts that input. Generally, it's a better idea to leave anything out of the 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 the Blueprint for the Actor that's being interacted with. So in the example of a lightswitch, use the lightswitch BP and it's trigger box to enable and disable input for the PlayerController overlapping it:alt text

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

  • An even better solution would be to use a Blueprint Interface. You can read some more about those here:

    https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces/index.html

    Using an interface would allow you to assign your F key to a function that operates on all Actors sharing it. You could set that function to enable input for the player controller, as described above, and then perform a particular function in those Actor BPs while input is enabled.

Hope that helps!

more ▼

answered Dec 03 '14 at 12:14 AM

avatar image bnisbet Dec 04 '14 at 07:45 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question