> I believe that the client should never execute this action, only the master / server can execute it but in my program the client also executes it at the beginning (when it connects) during some frames, then it does not execute it anymore.
> Why does this happen?
There is always single client in a room which marked as master. This may be useful when you choose running game logic on 1 client only and update other clients with game state from this client. In this case master client acts as a "server" while being regular client. Note that when current master leaves, another client from currently joined assigned as a master.
Please don't confuse master client with master server which is a part of Photon Cloud infrastructure.
Ok, this is solved, you just have to do it like this:
I am not sure that the problem has been understood.
I have two players in the room.
Only one of them is photon.masterActorNr
Only photon.masterActorNr will execute the actions of the condition "if (photon.MyActorNr == photon.MasterActorNr)".
The problem is that the player who is not a teacher / server also performed those actions at the beginning, when he entered the room.
The second player should never execute those actions because he is the client, this player is not the master. The master is already in the room when the second player entered, however, the second player executed the actions contained in the condition "if (photon.MyActorNr == photon.MasterActorNr)" during some frames
Then I need to identify which player is the server in the room.
This is achieved with the condition "if (photon.MyActorNr == photon.MasterActorNr)".
So why did the non-master player also execute the actions in the condition?
I need to run the logic of the game on the server only.
Could you try this example with 2 players?, It is the official example of fish.
https://www.dropbox.com/s/udjs22p38ygo2 ... .capx?dl=0
Only need the appID.
I only added this in photon eventSheet:
You can see that the text is also written to the second player (client).
But the condition indicates that it should only be written to the master player.