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"

Keypress not firing in children BPs

Hi everyone,

I have a little issue with detecting key press. The solutions might be really simple but I'm a beginner. Of course I've searched. I think that I've created my project using mobile/tablet mode.

I want to detect when a key is pressed inside an Actor BP. Here is how I go :

alt text

I've also tried to debug with breakpoints but this code is never triggered.

This code is in a BP that inherit from another. His parent do all the things to enable input : alt text

An important note (I think ?) I'm not sure to have a PlayerController in my world. I'm trying to do a little Guitar-Hero like so when I started the project, I've cleaned up some things (and this help me to understand some things).

Product Version: UE 4.15
capture.png (50.6 kB)
capture.png (42.1 kB)
more ▼

asked May 17 '17 at 12:45 PM in Blueprint Scripting

avatar image

10 1 4

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

2 answers: sort voted first

There's a bit more information that is needed to know why your input isn't being triggered.

  1. What blueprint class are you calling the input event with? Is it a pawn blueprint or some other actor?

  2. As you've stated yourself as a beginner, do you know if your player controller has possessed the actor you're expecting to control? If it's a pawn, then the game will do this for you with proper gamemode configuration.

  3. You should setup action mappings for your input events instead (see documentation)

What you need to know is that all player input is captured with a player controller. You do not spawn player controllers in your level as the gamemode will take care of this for you. As a player in the game, you inherently have a player controller because of this. If you want to directly interact with an actor via a player's input, then the player controller needs to possess that actor. In most cases, a player controller will possess a pawn since the pawn class is designed to be possessed by a controller. Hope that helps.

more ▼

answered May 19 '17 at 03:03 PM

avatar image

76 1 2 9

avatar image mildful May 19 '17 at 08:54 PM

Thanks for your reply.

  1. It is an actor blueprint

  2. Now my BP inherits from Pawn, I've manually set Auto Possess Player to my Player 0 and I've disabled AI Controller since I don't have any AI stuff.

  3. I know that, but it's just for debugging. I'm working on a mobile game and at the end the inputs will come from an external controller. At the moment the external controller isn't finished yet so I'm using "hard codded" inputs. Maybe there is a better way ? I think about mappings with the controller but I haven't looked yet if this is possible and how to do that :).

Very clear advises, thanks a lot.

With this new setup, it doesn't seems to works yet

avatar image Memorykiller May 21 '17 at 09:11 PM

I was able to print as expected with the setup described in this documentation. You shouldn't need to modify any configuration on the actor to get this input working as you've described in Step 2. If you can't achieve the expected result with a blank actor, then you might be experiencing input conflict since you said that the actor inherits from another actor that handles all your input. If that's the case, you'll have to architecture your code appropriately to avoid input conflict or you can configure something with input priority.

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

If you got a Begin Play in your Child BP make sure to right Click the Event and add Call to parent. Otherwise you simply overwrite the Functionality in your Child BP and never call the parents Functionality.


Aside from that you can have Input Conflicts if more than 1 Object in your World uses your Input Event (even if it is the same Object!). They follow a certain priority order who executes the Input event first not sure about the order but expect something like Controllers before Pawns before Actors etc. and for Actors I think its the last spawned has higher priority than any other Actor.

Now if you click on your Input you notice some options in the Details panel. As you can see there is a Consume Input checkbox that basicly says if I execute the Input its "Handled" nobody else need to recive the Event. If you uncheck it you basicly say I recived the Event, I done my thing with it and if somebody else wants todo something with it feel free todo so until someone "Consumes" the Input.


Thats about it.

more ▼

answered May 21 '17 at 09:42 PM

avatar image

7k 143 28 172

(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