okay, so I'm making a multiplayer game and I'm working off from the Pong multiplayer example. That example waits for 3 seconds before starting the game, but what I want to do is to have both the host and peer to press "ready" button before starting the game.
I keep getting problem here, I imagine I have to make the peer send a value to host indicating it's ready, and then I have to start the game after both the host and peer are ready. Somehow I fail to do that.
I use
is Host |
is ReadyInRoom | (start game here)
Multiplayer.PeerState(peerId, "ready") = 1 |
the ReadyInRoom variable indicates if the host is ready, and the peerState indicates if the peer is ready.