Problems with exchanging scenes

Options
Hello, I am new to the forum and the Photon platform also... I'm trying to make an exchange system in Unity3D scenes but doing tests with 2 players, one enters the trigger with the command "PhotonNetwork.LoadLevel (map);" usually crosses to the next scene however the second player continues to see it as he was in the first scene and when it switches to the next scene he can not see the first player, but the first can see it

Could you please help me? thanks ;)

Comments

  • You will have to do something to make it so that players joining the new scene either all wait and join at the same time, or you buffer the message queue so that when a new player joins the instantiate calls and the like will be called on them.

    See:
    http://doc.exitgames.com/en/photon-real ... #_messageQ
    (Timing for RPCs and Loading Levels)

    If you want the game to go on and have them stagger join the second scene, you'd have to do something like
    myPV.RPC("SpawnPlayer", PhotonTargets.AllBuffered)

    Buffered adds it to the buffered queue so that if someone comes in late or doesn't receive an rpc call, it will send it to them when they do.
  • I tried doing what you said, but still has problems, player 1 passes to another scene and after this they are no longer independent of the scene are.

    About "myPV.RPC (" SpawnPlayer "PhotonTargets.AllBuffered)" I tried to put the Unity says that it was not possible to recognize the "myPV.RCP" I do not know if this is the command that is missing but I can not use it

    What did I want to happen is, the player pass to another scene 1 and 2 stayed, and they were not able to see because they are in separate scenes (this was the case in earlier) and when player 2 wanted he could pass for next scene and find the player 1.

    Thanks for help.
  • Tobias
    Options
    Unity's scenes usually replace every GO in them when you load them. They make up different places, so to say. In them are items.
    In multiplayer, you want players to be able to act on the same items, so the items need some ID that's valid for all players in the same area. In level "a", network ID 1 refers to a box but in level "b" the first item might be a chair.

    If you change the level, you basically change the area.
    Photon's rooms are related to places and areas. Each room has a bunch of IDs for networked items in the area.

    In best case, all players in a (Photon) room use the same scene. You can either make everyone load the same scene (with PhotonNetwork.loadLevel) or you can change change the room to (also) load a different scene.

    You can read up on RPCs in the Marco Polo Tutorial.
    http://doc.exitgames.com/photon-cloud/M ... o_Tutorial