A logic and function question

Hi. I am setting up an interface relation between player and NPC. The highlevel logic involves the following sequence:

  1. An NPC that is near the player gets into a certain state that demands a response from the player (Interface “World2Char”)
  2. The message fires an event in the Player blueprint that collects data based on controller input, interprets the output and sends one of several messages of its own (Interface "Char2World)
  3. The recipient blueprint class actor starts one of several events based on the sent message

So with this context in mind, my question is as follows - what is the best way to collect actor references during stage two, given that there may be several NPCs of different classes demanding input at once? My initial instinct was to use a player overlap component, collect relevant actors that enter the overlap into an array, and use them as message targets whenever stage two is initiated. But I just cannot seem to make that work.

Any ideas on a good solution?

Have the inquiring actor pass a reference to self in the via the interface call. Populate an array and add/remove elements as needed with the flag resize array to fit toggled on.

Oh, nice. Definitely elegant, entirely removes the need to check for instance and class. Thank you!

You’re welcome : Glad it worked.