playMaker

Author Topic: Photon RPC Broadcast FSM event?  (Read 1866 times)

Zeathlar

  • Playmaker Newbie
  • *
  • Posts: 15
Photon RPC Broadcast FSM event?
« on: October 17, 2013, 08:59:55 PM »
I have tried numerous things to send one event across the network, none have

worked out for me. So I went around playmaker forums  to find some solution. I

have read this forum "Photon RPC event to specific instantiated object". So I tried

to use the "Photon view RPC Broadcast FSM Event" action, but all I get is

"NullReferenceExeption: Object reference not set to and instance of and object"

I have looked at the chat samples, but maybe this is not what I need?

All I am trying to do is have a player click a button, and music play's across the

network using two separate objects (Button and speakers).


PS: My Brain is melting

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon RPC Broadcast FSM event?
« Reply #1 on: October 21, 2013, 03:08:54 AM »
Hi,

 The chat system is what you need indeed, so keep studying that until you fully understand the difference between this example and your scene.

 typically, instead of sending a chat, you will send a string reference of the music, and instead of showing that string in a textfield, you will find the related music and play it.

 One other way tho is to have a prefab acting as the music player, and simply spawn that as if it was a player, only it's just a "music player" ( no pun intended ( no PUN intended)!!  :P

you can maintain player properties, so you could reference the music you want to play as a property of that player, OR have a prefab for each music you want to play and spawn the one you need, without further worrying about communication.

 Does that make sense?


bye,

 Jean