Accessing Enhanced Input Actions within a BluePrint

Hey everyone,

I have been working on a blueprint which has a box collision I’m using to trigger some events. The idea is that when a player walks over the box collision during the overlap event, they can press the “E” key which will switch cameras. The blueprint is working up until the point where the user interaction takes place, no matter what way I define this key press either with EIA or the old Action Mappings, nothing happens. The key stroke isn’t event registered.

To test the theory I stripped my blueprint back and simply had the key press print out a string, that doesn’t work either. Can anyone shed some light on what additional steps I may need to take with this? In terms of the EIA being initiated, it’s all done inside of the third person character blueprint.

There are no errors and everything compiles ok, even when I run my project, everything is coming back as ok, it’s just ignoring the key stroke.

This is the keystroke in question, as I said above, I stripped back my blue print to attempt to get this to work and just return a string. Nothing.

The setup of the EIA

The thirdperson character model blueprint which is the only place I thought this needed to be instantiated.

You have to open the enhanced mapping context, IMC_Default, then add the input action there with an optional default hotkey for it. It isn’t explained whether or not you did that yet. The pressed and released triggers inside IA_Interact are probably not needed for what you want to accomplish.

Hey @Yanayaya

You will need to add your input mappings to your collision blueprint if you want to call the actions directly from there. If you are just creating an interaction and not setting up full controls for an additional character, it may be better just to use a blueprint interface to set up the interaction between your character and your collision. This will let execute the action from your character, rather than trying to control the collision box directly. Check out this non-Epic affiliated tutorial on how to do so:

I hope the above is the solution you need!

2 Likes

This is a nicer solution, thank you.

Short cut is at 1:57

  1. Question about Enhanced Input Actions, and different hold times.
    For his door, he setup the IA “Interact” key to be held for 2 secs.
    But what if we if want the same Interact key (E) to only be pressed (not held) for a different object (window)?
  • Should we make two IA Interact assets?
  • E.g. IA_Interact_hold2, and IA_Interact_Press?
    And then in the DoorBP, are we able to add the node that is specific for IA_hold (E key), yet in WindowBP, add a different node for the IA_press (still E key)?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.