How to check which RPC was called first
Options
Hi, I am making a multiplayer game that is about fast reaction time. And I need to know which player, for example, clicked an object first. Right now I have it so that when an item is clicked, first it does a client side check to see whether the player clicked the right one or not. If the player does get it right, then it calls an rpc telling which stops the level for all players. However when two players click the same one at nearly the same time, it shows up as if they both got it correct. How can I check to see which one was called first?
0
Best Answer
-
You can send the RPC to AllViaServer. This is explained here:
http://doc.photonengine.com/en/pun/current/tutorials/rpcsandraiseevent
The idea is: Whatever RPC arrives first on the server "wins". All clients that get the RPCs will get them in the order of arrival on the server and that means you can use the first RPC and ignore the following clicks.1
Answers
-
You can send the RPC to AllViaServer. This is explained here:
http://doc.photonengine.com/en/pun/current/tutorials/rpcsandraiseevent
The idea is: Whatever RPC arrives first on the server "wins". All clients that get the RPCs will get them in the order of arrival on the server and that means you can use the first RPC and ignore the following clicks.1 -
Oh, that explains it, Thanks!0