Commanding AI's from client

Hey!

I’m making an RTS multiplayer game, and i’m wondering if there is way for me to cast to the AI controller to change something.
Its working on the server but when i try to get AI controller from the AI character on my client, the output is none.

When i click the “Attack Move” it should cast to the AI_Controller to change a variable. Works fine on the server but on the client side it fails.

The server knows about all the AI controllers in the game, and each AI has their own controller.

I Spawn the AI’s in a custom event from the server, when the player clicks “e”.

Controllers only exist on the server and the owning client.

That is, if there’s 32 players on a server (1 being the server), the server will have 32 controllers, and each client will have 1 each (their own).

You can’t do what you want from a client, nor should you. You must create a custom event on the server, set to “Run on Server”, which the client calls. Then the server handles the AI.