Playing with one Server and more than one Client, all clients above the first can´t move

Hi all,

so my real big Problem is that when i´m testing with more then 2 Players the second and third client (and above) are not moving (only the Player can´t move, the RTS cam works great), but i can rotate them. I´ve tested it in editor mode and in Standalone, its not working.
And here comes the strange thing for me: When i´m testing in editor and try to debug, i select in the Player Blueprint one Client and then lookin at one of the Players for debugging, and then suddenly the first Client can´t move (still only the Player Character) and the other client can move run jump, whatever he wants.
And after switching to another Player or client for debugging everyone can walk run jump and so on.

Gamemode_Main: Handle Starting Players

Function: Increase Player Count

Gamemode_Main: Spawn Players and get the Reference to the owning PlayerController_Main

Function: Spawn the Player and RTSCam

PlayerController_Main: Getting the References of the Player and RTSCam

Sorry for the Big Question :smiley:

Here are a few more pics, for better understanding.

PlayerController_Main: Switching the Pawn

PlayerController_Main: Switching the ViewTarget to Possessed Pawn

PlayerController_Main: details

Player: Move

Player: Rotate

And the last Pic´s:

Player: Details

Hmm. That’s a lot of stuff. Are you aware that every client sees his own first player controller as player controller 0?

yes i am, but how can that help me with my problem?

Just a sanity check. I don’t know what’s wrong with your project, but if you were instantiating clients as non-player-0, that definitely would have broken it.

Does Anyone know what the Problem is?
I really can´t find the solution for this.

I found that the server always assigns remote players an index of -1, even if I explicitly set their index on the server to something else, it reverts them to -1, and the only players allowed to have a non negative-one index are the players that live on the server itself.

To get around this problem, I make any remote procedure calls that have to match a local playercontroller to its server equivalent (which are NOT the same object it turns out, because playercontrollers don’t share across machines like pawns do), then I have to pass the PlayerState’s Player Id variable into the RPC and loop through all the player controllers, fetching their playerstates’ Player Ids and seeing if it matches. When I find the match then I tell it to do the action on THAT player controller.

So if you can avoid doing anything that has to match playercontrollers across machines, that’s better than what I did, but I had to do it at least once after they join the server in order to match up the splitscreen players’ preferences and assign them correctly. After that I don’t have to mess with it very much.