Check bool on another player

Hi everyone,

I’ve recently started the multiplayer for a project. I don’t have much experience with networking in unity, so I’m blaming lack of experience for this brain-block…

My problem is:

I have a bool ready; This bool is used on the menu to see if the player is ready, if they are display that they are and show a “Start game” button. Easy stuff! Now I’m having trouble checking the ready status of other players. All players need to know the ready status of all the other players, so that the GUI will update for each player.

This really boils down to “How do I check a variable on another player across a network”. RPC’s can’t return values for obvious reasons.

I have tried using RPC’s to pass variables, as shown in This Question but even then, I need to update the GUI based on the value of other players variable status, not just assign a variable to another players variable. I was thinking of assigning each player a number, then associating the ready bool in some way to that… But then it all gets convoluted and I start feeling like I’m overthinking things.

I would’ve thought that accessing variables on other players would be pretty simple, as I’m sure it would be used a LOT in multiplayer games, if someone could shed some light on this for me that would be great.

Thanks a lot!

Edit: I’m using Photon Cloud for networking. Not sure if that opens more options for me, or helps someone help me :).

Hi there, I am actually trying to do exactly the same scenario here on a game I am currently making. For each player, the Photon Network Plugin uses allocated View ID’s which can be set for each player for example, “int userID = PhotonNetwork.AllocateViewID ();” Using this might help you control each player’s view as you can write IF statements for their specific userID, however I still do not know how to get the boolean synchronized to make ready check.