Enemy only sees the Server!

The following is an AI_Task. There are multiple Enemy_AIs in the scene, my goal is to get the location of whoever interacted with them.
The system works very well, but in Offline.
In Online, it only gets the location of the character that created the server. It doesn’t care about the client.
I guess it’s because it has PlayerController and Index 0.
Any ideas?

In place of using the player controller to get it’s controlled pawn you should have a “current target” variable of type actor in your blackboard that should hold a reference to the player in this case.

This blackboard key should be set either from the perception component of the ai character or directly via an event.

You should also add in a isValid check to see if the event should even run through the whole process (Receive execute ai). If the “current target” is not set then it should ignore the rest of the code.

For the most part critical code should be running on the server and then be distributed to the client (never trust the client).

Only fluff code should be solely triggered client side:

  • particle fx
  • non-important sounds
  • decorative physics debris

Is what you mean something like this
AI_Controller:

Blackboard Task:

I guess not. I don’t quite understand, if possible, do you have any chance to explain or show it in a concrete way, it would be very nice. Thank you so much.