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"

InputAction Pressed/Released event consumption

I've noticed a behavior and cannot tell if it is a bug or not.

In my game, the player has a cell phone. When the player brings up the cell phone, most standard input functions are consumed by the phone, so for example InputAxis Forward and InputAxis Right are disabled by placing the event blocks and connecting them to nothing.

However, I also want to trigger a phone action off of the Release pin from an InputAction block, but not the Pressed. I have noticed that if I leave the Pressed pin empty, Pressed events are NOT consumed, and trigger (unwanted) behavior farther down the input tree. The Consume Input flag IS checked here.

I could see the case for having this be as-designed. But if it IS intentional, what is the best practice/most efficient "do nothing" block to attach to an InputAction to ensure that the event is consumed without doing anything?

Product Version: UE 4.8
more ▼

asked Aug 28 '15 at 06:53 PM in Blueprint Scripting

avatar image

12 1 2 4

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

1 answer: sort voted first

Do nothing could be a print string to the log of null or a space. I'm sorry i dont understand your setup 100% to disable input while say your phone GUI is up its sounding like you just dont want the player to move or look around.

SetGameModeUI or SetGameModeGame nodes make it much easier to do what I think your trying to do.

more ▼

answered Aug 28 '15 at 07:22 PM

avatar image

1.8k 67 27 137

avatar image GameDesignerBen Aug 28 '15 at 08:04 PM

For a variety of reasons, it doesn't make sense for me to use UI mode for the phone, but basically the setup we're talking about is:

There is a Blueprint that calls Enable Input and references player.

Then for this setup

alt text

InputAction Use Pressed is not consumed. Instead, it passes down the input hierarchy and triggers unwanted behaviors.

Assuming that's not a bug, I just need to know if there's a best practice for a "do nothing" action I can use so that the Pressed event IS consumed. A Print statement would work, I'm just wondering if there's a best practice for scripting an explicit "do nothing."

(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