Updating private data on one player's client
Options
Each player has an "inventory" list of data that nobody else needs to see. This list is maintained in a separate WCF data service / DBMS. A player can "give" an object to another player via WCF (i.e. make a call that adds the object to the other players list in the database). How do I then cause the receiving player to refresh their list (by querying the WCF service)?
The WCF/DB stuff is probably irrelevant (just for context) - basically I just need one player to tell another specific player's client to run some code! :-)
Thanks!
The WCF/DB stuff is probably irrelevant (just for context) - basically I just need one player to tell another specific player's client to run some code! :-)
Thanks!
0
Comments
-
Hi @NotQuiteSmith,
I guess in this case it is a good idea to use the RaiseEvent function in order to notify a certain player to update his inventory. You can do something like this:RaiseEventOptions options = new RaiseEventOptions { TargetActors = new int[] { 1 } // ID of the target actor }; PhotonNetwork.RaiseEvent(updateInventoryEventCode, null, true, options);
For more information about the RaiseEvent function you can take a look at this doc page.0