playMaker

Author Topic: [Solved]Photon RPC Issue  (Read 5401 times)

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
[Solved]Photon RPC Issue
« on: February 10, 2013, 08:02:35 AM »
Hi guys and girls.

I am currently working on a project where a player can click a GUI button and send a "gift" to another player. My issue is that when i click the GUI the gift appears on all players screens even though when using the 'Photo view RPC Broadcast FSM event' has the exclude self box ticked.

I notice there is another action called 'photon view broadcast Fsm event to player' but I do not know what i should be putting in the target player name section as my game allows the players to choose there own name if that makes sense.

If it helps my game has a two players per room max.

If you need more info I usually reply within 30mins.

Looking forward to hearing your solutions

All the best
WB
« Last Edit: February 14, 2013, 11:48:37 AM by will_brett »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Photon RPC Issue
« Reply #1 on: February 10, 2013, 12:49:50 PM »
Hi,

 Have you studied the demoWorker scene? it has a chat system very much open in terms of how you can broadcast a message ( or any kind of data really), and it exposes how you can send a message, to all, or to a particular player. In your case you want a particular player, so have a look at this fsm:

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

If you have trouble understand how this works or how to extrapolate this technic for your needs, let me know.

bye,

Jean

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Photon RPC Issue
« Reply #2 on: February 11, 2013, 04:58:29 AM »
Hey Jean,

Thanks for replying both here and at exitgames. I will have to look at the demo scene again as I can't figure out how to setup the "send RPC event to player" by which I mean I don't know what to put in for player name. I will try and figure this out later today,

All the best

Will

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Photon RPC Issue
« Reply #3 on: February 12, 2013, 09:48:43 AM »
I think I have spotted an issue.

I've got back through the demo PlaymakerTestGame... and straight away I got a load of error messages saying that there are lots of actions missing from the photonplaymaker package. e.g.

"PhotonViewRpcBroadcastFsmEventToPlayer"

"PhotonGUILayoutToolbarwithPlayers"

and many more. These are also missing from my project which maybe why I can't send chat or items to other players perhaps?

This is immediately after importing into scene with no modifications to the file
« Last Edit: February 12, 2013, 09:55:02 AM by will_brett »

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Photon RPC Issue
« Reply #4 on: February 12, 2013, 09:53:01 AM »
Here is the error console


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Photon RPC Issue
« Reply #5 on: February 12, 2013, 01:05:06 PM »
Hi,

 I think you simply have messed up your asset folder somehow.

1: BACKUP your project
2: try reimporting the photon actions package

if that doesn't work:

3: Delete the PlayMaker Folder
4: delete the Photon Unity Network Folder
5: Reimport PLaymaker and Photon and photon actions packages

try again.

bye,

 Jean

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Photon RPC Issue
« Reply #6 on: February 12, 2013, 03:06:15 PM »
Thanks for replying Jean,

However I've tried what you suggested 3 times and the same errors each time. Photon is no longer appearing under the playmaker menu at the top of the screen either. This has only happened since updating to Unity 4. Before it worked fine. 

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: Photon RPC Issue
« Reply #7 on: February 14, 2013, 11:48:21 AM »
Still couldn't get photon playmaker to load in a new scene but I have managed to fix my original problem by using a 'photo view get is mine' action so that gift is only sent to other player. This works in my case as my game only has two players.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: [Solved]Photon RPC Issue
« Reply #8 on: February 15, 2013, 12:26:19 AM »
Hi,

 Are you on windows or Mac? It works fine on mac. Have you upgraded to 1.5 as well? it just came out. Simply delete the playmaker folder and the photon folder as well and get playmaker 1.5. If that doesn't work, let me know.

Make sure you back up.

bye,

 Jean

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Re: [Solved]Photon RPC Issue
« Reply #9 on: February 15, 2013, 05:02:45 AM »
I am on a mac, I have used latest versions of both photon and playmaker, unsure why its not working but im sure its an issue on my end.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: [Solved]Photon RPC Issue
« Reply #10 on: February 15, 2013, 06:26:15 AM »
Hi,

 What's the current state of the errors you get with the latest?

bye,

 Jean