Overriding Enhanced input action from child class question

I was trying to create a child class of a child class then something went wrong. To be clear this is how my classes structured.

BaseClass>>1stChildClass>>2ndChildClass

The BaseClass is where I set up everything including the enhanced input system and the spacebar to print “I’m mother”

Then the 1stChildClass is a child class of the BaseClass, it has everything on default but added a line to print “I’m 1ST Child” when spacebar is pressed.

Finally the 2ndChildClass, it is a child class of the 1stChildClass, it has everything on default except another line to print “I’m 2ND Child” on spacebar.

Then I dragged the 2ndChildClass into the world, and possessed it. The expected behavioris when I press spacebar, it prints “I’m mother”,“I’m 1ST Child” and"I’m 2ND Child" in order but what I got was three “I’m 2ND Child”
image

I’m probably doing something wrong, I notice there is a priority setting in the class settings, maybe I should mess with that a bit?

Anyways, thanks in advance for any help offered!

1 Like

As a test, remove input action from both children and try again

With both their input action removed, Only the base class gets to print its string
image

It actually fixed it self when I add another input action to the blueprint.

blueprint with added input action
execute result, I still pressed the same key, the addition input action’s key is not pressed

hmmmm, don’t know why but this seems to fix the problem

Glad to hear that you resolved your problem.

I may be wrong, but I think the problem was that you were overriding print with a 2nd child.

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