PhotonNetwork.LoadLevel

Options
Hello.

I have the following task:
i have main scene. When two players have a collission, they're ransfering to battle scene. On the battle scene players have battle character and they can control their char.

I'm using PhotonNetwork.LoadLevel to load battle scene for two player, but what's the next?

I have to make another ConnectUsingSettings and Create/Join room? After that OnJoinedRoom() i should Instantiate players?

Comments

  • Uhm, sorry i tried to use only PhotonNetwork.Instantiate on Start() and it works perfectly.

    The other problem is both players created in the same position.

    How can i place the first player in one corner and the second player in another corner?
  • vadim
    Options
    Hi,

    You mean setting object position in PhotonNetwork.Instantiate (2nd parameter) does not work for you?
  • nope, it works perfectly.

    But Start() method launches for both players. So each player create an object in the position i mentioned in Instantiate.

    This script is attached to MainCamera. And i want to create the first player from prefab A in position X and the second player from prefab B in position Y.
  • Tobias
    Options
    Each player has a unique PhotonPlayer.ID. This might help positioning characters.
    Be aware: The ID assigned might be higher than the maxPlayer value. If a player leaves, his spot in the game is free but his ID is not. So if player 2 leaves, the next is 3 and so on.