Issue with blueprint interface

Hey! I made an bp interface for the interaction system of my project, which used to work like this:

Player looks at interactable actor, triggers a widget in the world to tell the player they can interact with the actor, player presses the input key to interact, interacts with the actor.

There’s a few different actors they can interact with: inventory items, readables and actors they can examine, either picking them up and rotating them or just saying something about the actor, which pops a line of dialogue and a subtitle.

While reworking UI for the last two types, I realised it wasn’t working properly, as it was before. After adding some print string nodes to check where the issue was, I realised the interaction interface was getting triggered as many times as many actors of that type there were loaded in the world. Before it only triggered once, now it triggers a bunch of times, which doesn’t make sense.

Have there been any changes to the blueprint interfaces in version 5.7.4? This started to happen after I updated.

The interface did not start broadcasting in 5.7.4. A Blueprint Interface message only runs on the object you pass in as the target. If one key press prints once per loaded actor of that class, something in the graph is calling the message on every instance. The count matching the number of actors is the loop, not an engine change.

Where the print sits tells you which side is looping.

If the print is inside the interface event on the interactable, the player or the controller is calling every instance. Right-click that function in the interface asset and use Find References. After a UI rework the usual graph is Get All Actors of Class, or Get All Actors with Interface, then a ForEach that calls the message. A line trace should call it on Hit Actor only, once. A multi line trace or a sphere overlap with no “closest hit” break will also hit every actor in range, and if they all overlap each other that is the whole set.

If the print is on the player, each interactable is calling the player. That happens when the prompt logic was moved onto the actor and every instance runs it on Tick or on a timer. Only the actor you are actually looking at should send it.

Keep a single Focused Actor variable on the player. Each tick, one line trace from the camera. Not a multi trace. Ignore the pawn, and use a channel that only the interactables block. If the hit actor implements the interface and it is not the current Focused Actor, send the hide-prompt message to the old one and the show-prompt message to the new one. If the trace misses, clear the old actor and set Focused Actor to empty. On the interact key, call the interact message on Focused Actor only. Do not call it on the class.

On the actor, print the display name of self, not a fixed string. Every instance name on one press means the caller is still looping. The same name many times a second means Tick with no “only when focus changes” gate.

Nothing in 5.7.4 fans an interface message out by itself. The trace or the ForEach is the part that changed while the prompts were being reworked.