After closing my widget, the first Keyboard press doesn't do anything, then the second triggers fine. Can someone help me?

To explain more:

You walk up to someone and my InteractInterface (bound to the E key) triggers you to enter into Dialogue. It sets your game input to UI only and focuses on the widget. The Dialogue widget has a button that removes the widget (itself) from viewport and sets the input back to Game Only.

While still overlapping with the NPC and not having moved at all, the first E press to re-interact with the NPC doesn’t do anything - but then i press it again and it opens the Dialogue widget like normal. This happens every time and I don’t know why so any help would be appreciated! I’ve included as many pertinent screenshots of the blueprints.

I’ve checked the Debug flowchart and the first press doesn’t even fire from the EnhancedInput Event.

I’ve attatched photos of the relevant blueprints, really unsure why this is happening :frowning:




Try calling:

image

After this:

image

Still the same outcome unfortunately, i appreciate the suggestion though!

Can you trigger a breakpoint on the Set Input Mode Game Only node?

Breakpoint successfully pauses the game and focuses on the Set Input Game Mode node as it should, so it’s definitely firing when i click the close button.

1 Like

While still overlapping with the NPC and not having moved at all, the first E press to re-interact with the NPC doesn’t do anything

Does it affect E (Interact) only? How do other input sources behave?

You walk up to someone and my InteractInterface (bound to the E key) triggers you to enter into Dialogue

That’s in the player?

I’ll set up another identical Enhanced input (Within the player character blueprint) and connect it to an interface, then implement that interface with the Blueprint Actor (NPC) and see if it fires - I’ll reply with results

[…]the first press doesn’t even fire from the EnhancedInput Event.

I mean, you must have other input in the player already? Like movement? The question is - does it affect that one IA (E) or all input in the player.

It only affects that one IA (E), all other movement using the keyboard and mouse works fine.

I’ve also just set up an Identical IA (R) in the player character blueprint, called it debug and implemented it within the NPC’s blueprint. After closing the widget and pressing R, it successfully triggers first time - unlike the IA (E) which still has the dead press on first trigger.

Where else do you use E? Sounds like it’s being consumed. Is there anything special about this input action?

At the moment it’s a bare bones file so I’m only just starting to fill it with blueprints, so this is the only interacting / use for E. There is one other blueprint in the level that has the interface implemented and that requires two presses after closing the dialogue from the NPC. I’ll double check all the references to the IA (E) to make sure it isnt being consumed elsewhere.

image

You could quickly test it by unticking this in the IA. It generally goes like so:

image

If anything above the Pawn gets to consume input, it’s gone. Admittedly, Enhanced Input made things somewhat more explicit.

Tried it unticked and nothing changed :smiling_face_with_tear: I appreciate the effort you’re going too to help me with this I’ve been tearing my hair out over this for the last few days.

I’d remove and re-add the input action after 10 mins of what seems to be phantom debugging. That’s how I lost my hair to start with :man_bald:

Chances are the editor is simply drunk.

I will give this a try and if it doesnt work - then I shall congratulate myself for having a new mechanic of double pressing in my game :upside_down_face:

Well, I completely removed the IA and the Interface associated and deleted all references to it.

Created the IA (E) again, created the Interface again, hooked the interface up, implemented it ONLY to the NPC.

Still does a dead click even after all of this. New mechanic it is!

I normally use this commands inside the widget.
it works inside the widget but externally maybe it wont allow you to execute commands because it’s focused
I would put the “remove from parent” end of the command sequence. maybe that can help

Its solved!!! The solution finally was:

Changing the Trigger event in the Input Action (IA) for interact or the E key from Pressed to Released and then in the EnhancedInput Event for Interact, change the input pin from Triggered to Completed AND IT WORKS!!!

1 Like

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