playMaker

Author Topic: Photon RPC Creating Object bug?[Solved]  (Read 1811 times)

RC

  • Full Member
  • ***
  • Posts: 148
Photon RPC Creating Object bug?[Solved]
« on: March 16, 2015, 11:38:24 AM »
Hi,

One wall after another wall.  :-\

After I found how to use RPC to tell other player to create a bullet at the sender position.It create the bullets, but its creating two bullet at once instead of one at a time.

I can't seem to understand why creating an object through RPC does that.
could it be a bug?

Thanks.
« Last Edit: March 16, 2015, 04:42:50 PM by rongconcrx »

RC

  • Full Member
  • ***
  • Posts: 148
Re: Photon RPC Creating Object bug?
« Reply #1 on: March 16, 2015, 01:11:59 PM »
So it doesn't just create 2 bullet.
It create x amount of bullet for x amount of player per client that is in the same room.

If I have 2 player connected to a room. It will create 2 bullet on player 1 and player 2 scene, instead of 1 bullet per screen/scene.

If 4 player is connected to a room. It will create 4 bullet per client screen/scene.

RC

  • Full Member
  • ***
  • Posts: 148
Re: Photon RPC Creating Object bug?[SOLVED]
« Reply #2 on: March 16, 2015, 04:34:23 PM »
sending rpc to a game object that manage other fsm in Hierarchy did the trick, instead of sending it to the player itself.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon RPC Creating Object bug?[Solved]
« Reply #3 on: March 18, 2015, 02:24:34 AM »
Hi,

 Good, I am gladd you are able to work it out.

you should also if you send it to yourself simply check for "is Mine" and not do anything if it is true, then you can rpc an event to your networkView safely and be sure that only slaved will react to that event.

Bye,

 Jean