Download

Press Key Event not working at all!

Im really sorry to come here with this problem, but im extremly stuck with this and i looked for a solution for over a week.

The blueprint is simple, when my character does overlap with the collision box of an object, the object blueprint enables input and when i press E i want to print string hello!.

When i do overlap, those two inputenable/inputdisable print string work. But if i press E, it doesnt.

Googling give me some tips, Block Input on the character is unselected and auto receive input to player 0, i printed string about playercharacter and playercontroller to confirm im using thirdplayercharacter and playercontroller from player index 0.

I recreated other item, i recreated other characters, but i always come to the same problem, the press key event dont works for me.
I went to proyect settings, and create an action map key, and recreate the event from that input, didnt work either.

Im out of ideas, and im really frustrating because i saw some tutorial doing the same exact thing and works as simple as it sounds, but not working in my proyect.

For that, i call for help to this forum, thank you a lot for advance, and i really sorry about my bad english.

Just try it on the level BP to start with, turn in on:

Screenshot_1

Once you have it working there, then try in another BP.

Going from the code you posted, it doesn’t have the player controller reference in the right place. The player controller reference should be connected to the player controller pin. The target should be the actor you are enabling input on. In this case it’s a reference to self since the enable/disable input functions are being called in the actor you want to enable/disable input.

Here’s and image from the docs.

The documentation Setting Up Input on an Actor | Unreal Engine Documentation.

1 Like

Uniname77

That was the problem, im trully thankfull, i was getting crazy, sorry for this stupid question, im a newbie on this but im getting really passionate about it.

Thanks a lot for this!