The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

[SOLVED] Can't move when two players are connected

2017-01-06 01:04:58

I am following this tut:

I just finished the 2nd page of the tut. When I run it in the editor the player moves just fine. When I run it in the standalone client the player moves just fine.

When I run two standalone clients, it starts up just fine. I get players 1 then they both change to 2 when the second player joins. I hit the start button and player 1 spawns but that is it. I can't move player 1 and nothing spawns on the player 2 screen. Player 2 does not spawn on client 1 either. If I disconnect one of the players it then picks up and works just fine with the correct player number.

When I run it in the editor and a standalone, They both just show 1 player and both have the start button. I can control either player depending on which one I am in. It seems as if both are the master client.

I redid my app ID just in case it was wrong and wasn't connecting to my server. I rebuild the client (several times) and then immediately tried the editor and the client but it still did not work.

Turns out the tut is wrong. I downloaded the working demo and figured it out. On page one of the tut towards the bottom of the page. There is the OnGUI part of the script. It as this in it:
PhotonNetwork.automaticallySyncScene = true;

Seemed kinda odd to be there to me. Turns out is wrong in belongs in the Start() function.
should be:

void Start()
PhotonNetwork.automaticallySyncScene = true;

Also there is a typo on page 3 towards the bottom:

projectile.owner; = owner;

there is an extra semi colon before the = sign


2017-01-06 12:58:07

Thanks @Kobaltic, we will check the tutorial and make the proper adjustments.

2017-01-10 19:42:18

I can confirm this too. Also would be nice if the (Link?) actually linked to the next page ;)

Back to top