Can't Override InputAction on Subclass Blueprint

Hi,

So, i’m trying to use a blueprint subclass which shares much of the same functionality of the parent, but some input Actions I would like to disable. I was going just fine doing this with InputAxis events that go to nothing, but for InputActions the override only works if i have an execution node after the event. This image in how the debugger interprets it is exactly the behavior I’m noticing.

I was wondering if there is a better way to accomplish a child disabling some input actions…or if anybody could explain why I need some execution node in order to consume it for InputActions, but not InputAxis?

Thanks

Hi,

The following snippet from https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Input/ says that the most recent input enabled actor receives input first. Have you tried blocking input on the subclass, compiling and then enabling it and compiling again?

InputComponents are most commonly present in Pawns and Controllers, although they can be set in other Actors and Level Scripts if desired. The InputComponent links the AxisMappings and ActionMappings in your project to game actions, usually functions, set up either in C++ code or Blueprint graphs.

The priority stack for input handling by InputComponents is as follows (highest priority first):

  1. Actors with “Accepts input” enabled, from most-recently enabled to least-recently enabled.

If you want a particular Actor to always be the first one considered for input handling, you can re-enable its “Accepts input” and it will be moved to the top of the stack.

  1. Controllers.
  2. Level Script.
  3. Pawns.

If one InputComponent takes the input, it is not available further down the stack.

If that doesn’t work, what about making a function in the parent and overriding that function in the subclass? E.g. In the parent create a function called PerformJump and attach it to InputAction Jump and then in the subclass override PerformJump.

1 Like