playMaker

Author Topic: "Photon View RPC Broadcast Fsm Event With Data" do not work?  (Read 2848 times)

Krillan87

  • Beta Group
  • Full Member
  • *
  • Posts: 185
"Photon View RPC Broadcast Fsm Event With Data" do not work?
« on: September 25, 2017, 07:13:23 AM »
Hi,

I'm trying to send a game object reference with a RPC call. And after some research i guess the action i should use is "Photon View RPC Broadcast Fsm Event With Data" and on the receiving end I use "Photon View Get RPC Event Data".

I van not get this action to work and there is no shlp in the forum regarding this. Anyone know if this works or do I have to only send string-variables with RPC?

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: "Photon View RPC Broadcast Fsm Event With Data" do not work?
« Reply #1 on: September 25, 2017, 10:13:47 AM »
I don't think you need to use the FSM event with data.

"Photon View RPC Broadcast Fsm Event" allows you to send a string of data too. maybe try this, as long as on the receiving end you have a "get event info" you should be able to grab the string sent in the RPC call.
« Last Edit: September 25, 2017, 10:15:29 AM by shinodan »

Krillan87

  • Beta Group
  • Full Member
  • *
  • Posts: 185
Re: "Photon View RPC Broadcast Fsm Event With Data" do not work?
« Reply #2 on: September 25, 2017, 06:08:41 PM »
I don't think you need to use the FSM event with data.

"Photon View RPC Broadcast Fsm Event" allows you to send a string of data too. maybe try this, as long as on the receiving end you have a "get event info" you should be able to grab the string sent in the RPC call.

Yes I know that the "Photon View RPC Broadcast Fsm Event" allows me to send a string, but I do not want to send a string, I want to send a game object.

The problem with only sending a string is that it is very messy of converting a string to a game object, even tho i understand that i would work,

I really feel like I'm using the actions correct but it just do not work.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15496
  • Official Playmaker Support
Re: "Photon View RPC Broadcast Fsm Event With Data" do not work?
« Reply #3 on: September 26, 2017, 04:31:35 AM »
Hi,

only strings for now unfortunatly.

 also sending gameobject reference is dangerous, what reference do you mean? the name of the gameobject? it's uid?

 Bye,

 Jean

Krillan87

  • Beta Group
  • Full Member
  • *
  • Posts: 185
Re: "Photon View RPC Broadcast Fsm Event With Data" do not work?
« Reply #4 on: September 26, 2017, 06:43:31 AM »
Hi,

only strings for now unfortunatly.

 also sending gameobject reference is dangerous, what reference do you mean? the name of the gameobject? it's uid?


 Bye,

 Jean

Hi,

Well, I had one FSM that was handling all the creation of spells in my RPG-games. For the FSM to know what spell it should create it needs to know who made the RPC call, this was why i needed to also send what gameobject made the RPC call. But if only strings work right now, I'm take a try to think of another way of accomplishing this in the best way possible.

Maybe I should create 1 fsm / spell, and then make the RPC call to that specific fsm instead of sending it to "all"

Thanks for your help

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15496
  • Official Playmaker Support
Re: "Photon View RPC Broadcast Fsm Event With Data" do not work?
« Reply #5 on: September 29, 2017, 03:28:01 AM »
Hi,

 you could code this all into one string

"SpellID-otherInfo-MoreIds"

by composing your string with multiple delimited info, you can send a lot of info in one rpc call.

 the other way is to turn your spells into networked gameobject and simply instantiate them, they will spawn across all clients, that would be a solution too.

 bye,

 Jean