Check and swap for properties (CAS): How to know which property set failed or not
This page describe how to make use of CAS:
Now consider the following:
My players are in a 10 players room and walk around the map. By interacting with a specific gameobject on the map, they can trigger a small 2 player versus mini game. The 2 players competing in the mini game should still exist on the 10 player map (suggesting that they have to stay in the same 10 players room).
To make sure a mini game is triggered with only 2 players (and not 3 that would trigger at the same time) I'm implementing CAS on a custom property:
- Player A will set the "current_opponent" custom property of player B to "PlayerA".
- If CAS is successful, Player B will set the "current_opponent" of player A to "PlayerB".
- if CAS is successful again, the versus minigame will start.
Now my issue with this is that when a property is set and I check the CAS result in "NetworkingClientOnOpResponseReceived(OperationResponse opResponse)" I only get the result (success/fail), not which property was successful or not.
Is there a way to know which property the CAS response is refering to ?