Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Zeathlar on October 06, 2013, 08:54:01 PM

Title: Photon Help
Post by: Zeathlar on October 06, 2013, 08:54:01 PM
I have Searched for 2 days trying to find a good tutorial on how to get playmaker to work with photon. I have seen this tutorial https://hutonggames.fogbugz.com/?W928 . I have set up the "AppId", and have "add network-ready FSM to (player)". I have also added the action "Network Instantiate" to the player object.

An error I am getting is:

Failed Network.Instantiate because we are not connected.

help please =-s
Title: Re: Photon Help
Post by: jeanfabre on October 07, 2013, 02:41:24 AM
Hi,

 You do need to connect to Photon, and join a room before you can instantiate a "network read Fsm".

 You need to go through all the fsm involved in the tutorial you mention, there is a lot more involved in the process then creating the player.

 can you confirm that you are indeed connected and joined a room already or not?

Bye,

Jean
Title: Re: Photon Help
Post by: Zeathlar on October 07, 2013, 09:41:54 PM
Thanks for the reply Jean. Yeah I keep reading that photon tutorial over and over, but It just is not clicking in my head. Am I suppose to be doing all of this in the first level, or in a different scene. The way I have it setup right now is:

1. I have 2 separate scenes, one for the main menu (where I have the FSM to connect to photon) and the first level where the player joins.

2. I have an empty game object with the FSM for the photon actions.

3.I have already set up the photon Wizard (everything is green)

some pictures of what I have. I have remove the models from the scene


thanks for taking the time to help out. I really do appreciate it.

http://s830.photobucket.com/user/pollygone262/media/Unity3d/Network_zpsb3e19c92.png.html?sort=3&o=0
Title: Re: Photon Help
Post by: jeanfabre on October 08, 2013, 03:03:07 AM
Hi,

 I guess it's simply a mix up of logic here.

 Can you try with one scene to validate that you can indeed connect and list rooms or give access to create a room?

bye,

 Jean
Title: Re: Photon Help
Post by: Zeathlar on October 08, 2013, 12:45:38 PM
I does seem that I can connect. I am getting network activity when I click play.
Title: Re: Photon Help
Post by: jeanfabre on October 08, 2013, 02:06:21 PM
Hi,

 connecting is not done when you start playing the unity scene. it's specifically called by your logic using the actino "connectwithSettings". Are you doing this?

bye,

 Jean
Title: Re: Photon Help
Post by: Zeathlar on October 08, 2013, 03:45:25 PM
Yeah I have that in a loop, it will keep connecting until it connects, but yeah It is connecting I can see it in the console and on exitgames.com/dashboard. The thing is I don't know how to allow people to select a room to join, and then load the level when joining the room with the character =s. You where not kidding when you said there is a lot to this networking stuff lol

Thanks
Title: Re: Photon Help
Post by: jeanfabre on October 09, 2013, 01:27:35 AM
No, I was no kidding...  ;D

Go through the example, it's very important, in there you'll find how to list rooms, how to join a random room or create a new room, etc. These are necessary steps.

 HOWEVER; depending on your type of games, Photon has some nice tricks to do matchmaking and stuff, so make sure you read Photon documentation very accuratly, it may contains exactly what you need and will avoid you going the wrong way. Even if you don't understand the scripts, it's anyway essential to understands the concepts, else you won't be able to go where you want.

Bye,

 Jean
Title: Re: Photon Help
Post by: Zeathlar on October 09, 2013, 08:10:54 PM
Well, I just spent the last 4 to 5 hours trying to figure this out                               ( https://hutonggames.fogbugz.com/default.asp?W864 ) from the Part with create room and join room. I just cant figure that out. I'm pulling my hair out trying to get this thing going. I don't know what im doing wrong here, and I only have 1 week to try to figure this out =-c . otherwize im going to have to just delay the multiplayer for later and just allow single player (not something I wish to do). the funny thing is, I thought with playmaker I could figure it out with in 2 to 3 days...I was such a fool...

...end Transmission... 
Title: Re: Photon Help
Post by: jeanfabre on October 10, 2013, 01:49:32 AM
Hi,

 Ok, the typical mistake here is to not handle the message queuing off an on at the right time.

If it's working in the demo, I am not sure what's going on in your scene, since you can litteraly copy paste what's there.

 Have you try that? You are likely doing everything ok, just missing a simple concept here or there. So you have to properly debug your fsm, and check that each steps are correct and matches the demo ( if you have rewritten everything), else it coul dbe a simple missing variable or bad copy paste.

What's not clear in that particular link you sent?

Keep at it, it will work!

bye,

 Jean
Title: Re: Photon Help
Post by: Zeathlar on October 10, 2013, 01:32:36 PM
0.o

 Are you saying there actually is a downloadable scene that I can use to teach me how to use this thing with playmaker? I didn't see one in the asset store. Where can I download this!
Title: Re: Photon Help
Post by: jeanfabre on October 10, 2013, 01:39:50 PM
Hi,

 Yes :)

http://www.hutonggames.com/samples.php

I have updated the wiki page to better reflect this and properly link to the sample page.

https://hutonggames.fogbugz.com/default.asp?W928

bye,

 Jean


Title: Re: Photon Help
Post by: Zeathlar on October 11, 2013, 01:46:37 PM
The demo files really helped me a lot, and I thank you for you help. I have just two things to ask. one is I am getting this error:

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced).

my game is still working just fine but I dont know why the console is saying that.

and I know this isn't related to photon, but is there a way I can change the default "Link Style" in playmaker from bezier to circuit?


Thanks again you really helped me out a lot!
Title: Re: Photon Help
Post by: Lane on October 11, 2013, 02:02:01 PM
The demo files really helped me a lot, and I thank you for you help. I have just two things to ask. one is I am getting this error:

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced).

my game is still working just fine but I dont know why the console is saying that.

and I know this isn't related to photon, but is there a way I can change the default "Link Style" in playmaker from bezier to circuit?


Thanks again you really helped me out a lot!

That error is when GUI Layout Begin Area does not have a GUI Layout End Area action to end it, so you pop more begin's than you pop end's and it causes an error. Just find it and add the End action to close it up.

There is a preferences button in the bottom right of the Playmaker Editor window next to the Hints button. Click it and change the dropdown menu to Graph View, then change Beizer to Circuit.
Title: Re: Photon Help
Post by: Zeathlar on October 11, 2013, 09:21:33 PM
Ah, That worked Thank you very much  :P