1
PlayMaker Help / Re: Photon Pickup Manager
« on: July 30, 2013, 11:58:36 AM »
Actually, the coin counting is working great.
Let me see if I can explain this a little better.
1) Player A instantiates and his Coin Manager FSM instantiates a coin. Player A is the owner of that coin. It has been instantiated by photon and exists on everyone's game.
2) Player B instantiates into the came and his Coin Manager FSM instantiates another coin. It also has been instantiated by photon and exists on everyone's machine.
Player A can pick up their own instantiated coin without any issues. Photon destroys the coin and it vanishes from everyone's game.
Here comes the issue.
When Player A tries to pickup the coin that was instantiated by Player B, it fires off an error saying that you can't destroy an object that is owned by another player.
So I have to query Photon to find out who the owner of the coin is and tell them to destroy it. Only problem is that when Player A tries to tell Player B to destroy it (using the RPC Call) I can't pass the game object to destroy.
Let me see if I can explain this a little better.
1) Player A instantiates and his Coin Manager FSM instantiates a coin. Player A is the owner of that coin. It has been instantiated by photon and exists on everyone's game.
2) Player B instantiates into the came and his Coin Manager FSM instantiates another coin. It also has been instantiated by photon and exists on everyone's machine.
Player A can pick up their own instantiated coin without any issues. Photon destroys the coin and it vanishes from everyone's game.
Here comes the issue.
When Player A tries to pickup the coin that was instantiated by Player B, it fires off an error saying that you can't destroy an object that is owned by another player.
So I have to query Photon to find out who the owner of the coin is and tell them to destroy it. Only problem is that when Player A tries to tell Player B to destroy it (using the RPC Call) I can't pass the game object to destroy.