Spawn multiple player controllers in multiplayer game

If “isBeingControlled” is always “false” then “Cast Player” would never be “none”, because it would be set. Maybe something about the actor is not right, so check “isValid (with the question mark)” of the actor you are checking. It may be that you access something which is not valid. And in that case the variable “Cast Player” can not be set despite branching into the “false” path, because the value is not valid.

The index numbers should start with 0, because that is how arrays work, so what happened to the 0? In terms of networking the player controller with the index 0 is always the local machine. So on the server player controller 0 is the server itself and on the client player controller 0 is also the client itself. If you get all actors of your characters and generate an array I guess there is no structure (maybe it takes the server’s character first? you have to test that to be certain), so you have to check which character has the authority (authority is also important in networking so you know if you execute stuff on the server or on the client side). The character/player controller who has the authority is the server in most cases, but there are also other cases where things switch around.