playMaker

Author Topic: spawnign and joining a room in a differnt scene with photon?  (Read 6929 times)

invayne

  • Full Member
  • ***
  • Posts: 105
spawnign and joining a room in a differnt scene with photon?
« on: February 15, 2015, 02:13:06 PM »
so for starters i can make a room  and spawn a player into a lobby scene. least i think im doing this right.

on the create button i do a photon / state : connected global with a ugui onclick  event that sends an event to another state where is do loadlevel and photon network create room actions  and this will spawn me at my spawn point.

now on my lobby screen where you see rooms my room shows up and it shows that i have a player connected.  now when i go to join that room im doing a photon / state : connected global  and on the first state im just grabbing the name var from a different fsm then  do a next frame event to the onclick state for the button and from there im doing a event connection to another state that joins the room from join room state i use a next frame event to another state to  load the level. which works and i can spawn  into the level but not a level with the other player. not if i open a 3rd client it will show 2 players in the room so im a little confused as to what is going on. seems im not actually connecting to the hosted game even though it says im in the room. so im hopping someone has done this and might have some info on it.

 any info on this would be really great thanks!

invayne

  • Full Member
  • ***
  • Posts: 105
Re: spawnign and joining a room in a differnt scene with photon?
« Reply #1 on: February 17, 2015, 10:09:32 AM »
so im still confused i have set up everything according to all the info i have gone through and searched forums and tried stuff posted here. my player prefab has a proxy and a photon view with it script attached. i have a proxy in every scene that deals with the multiplayer aspect of the game i can create and join rooms but players are still not visible after joining the room.
« Last Edit: February 17, 2015, 10:13:19 AM by invayne »

ermak

  • Junior Playmaker
  • **
  • Posts: 60
    • AL Games
Re: spawnign and joining a room in a differnt scene with photon?
« Reply #2 on: February 18, 2015, 10:21:59 AM »
Hi,

You trying this on your own scene or example scene - and not working?

Can you try this:

1. Make new unity project.
2. Import Playmaker
3. Import PUN 1.28.3 from
https://hutonggames.fogbugz.com/default.asp?W928
4. Get attachment from this post and move him to:
Assets/Photon Unity Networking/PlayMaker  - Demo folder
5. Open this scene:
Assets/Photon Unity Networking/PlayMaker/Demo/playmakerTestGame.unity
or
Assets/Photon Unity Networking/PlayMaker/Demo/Separated Scenes Demo/demo_lobby.unity

And see if they working.
If example scene working, then something else is wrong with your game logic.
Also be careful with PhotonNetworkSetIsMessageQueueRunning.

invayne

  • Full Member
  • ***
  • Posts: 105
Re: spawnign and joining a room in a differnt scene with photon?
« Reply #3 on: February 18, 2015, 11:05:59 AM »
yeah dont know whats wrong but anything to do with spawning in a different scene dosent seem to work out to well. no idea why itll spawn 1 character but not all the rest get spawned in there own little space. but i was able to get it to work with just the straight demo. which annoys the hell out of me since the game logic i was using was almost the same as the demo with a few minor addons like loading a new scene ect. seems the join room seems to be the issue on this one since it wont allow for loading the level with out start a whole new level. spent 3 days testing every aspect of this and never got it to work so im down to using the playmaker demo version which ill have to configure that to work for my needs but im guessing level loading into a new waiting room wont work. havent tested going to a new scene yet after characters are loaded in.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: spawnign and joining a room in a differnt scene with photon?
« Reply #4 on: February 19, 2015, 06:44:56 AM »
Hi,

 I recall I did a version of the demo that works with different scenes, have you studied that version? I have a scene for the lobby and a scene for the room.

It's the demo folder under "Separated Scenes Demo" folder.

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: spawnign and joining a room in a differnt scene with photon?
« Reply #5 on: February 19, 2015, 10:50:25 AM »
thanks jean didnt even notice that was there