How to move non-possesed Pawn from client in server game ?

I work on a rts project. I am trying to run the game on server and I have some pawns which are not possesed but can be moved by players. My issue is I have to do MOVE TO ACTOR OR LOCATION with AI controller which seems to run on only on server and yes that works when my player is server but other Clients can not move their pawns to anywhere. I tried to pass this event as replicated but it is not firing at this time. What should I do to move pawns on server game when I am not possesing them ?

Hi, the only controller that exists on a client is the controller of that client. So all the AI controller do not exist on the clients, therefore the clients can never access them.

So the client will need to tell the server what he want to do and then the server executes all the logic.

Thanks for your answer, I made a server event and that works. However, normally I use a dispatcher and bind it to custom event which has a server replicated event and dispatcher called in game_player (possesed) pawn. You can see it on secon image. In this case it is not firing. I think this is the issue for me.

The Possess Event will only be called on the server, not on the clients. So you would need something like a RunOnOwningClient event after the Possess event and call the event dispatcher there.

Otherwise did you check that the MoveToLocationEvent does even execute?

Thanks for your help, after spending an hour and becoming cancer, I finally got how that should be managed.

  1. I keep my server Event [MOVE_UNIT]in unit character (contains move to location and not possesed)

  2. I made server event [MOVE_UNITS] (gets one player as ref and called from right click event, then runs foreach loop, inside it unit reference passed)
    in game_player pawn that also gets locations from client in event inputs. (possesed)

  3. Inside [MOVE_UNITS] I get selected Units (characters) and at foreach loop I call [MOVE_UNIT] with params.

After these modifications, that worked…

I hope that there will be no other issue.