Turn based multiplayer problem

Hi,

Im working on a multiplayer chess type game. I have a Game Manager script which creates the game objects for each client, Im using the Photon API. Each game piece has a script attached to detect when the player clicks on the object, the problem is, the other client can also select and move the objects created by my/local game manager, how can I block this.

Tks

You have to distinguish between local and remote pieces somehow. I don’t know anything about Photon because I am targeting mobile and don’t have Unity Pro- I’m just using RPCs- but the way I did it was tag local units with the “LocalUnit” tag and remote units with the “RemoteUnit” tag.

Only the ones tagged LocalUnit are selectable, the GameController moves the remote ones when a move order is received. I have them set up as belonging to two lists whose index numbers match. So when I tell allMyUnits[n] to do something, I also send a message to the other player’s GameController that then tells allYourUnits[n] to do likewise.

Hi Kilo,

Thanks for the response, I just found the solution.

if(photonView.isMine)