Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: adrian on May 04, 2016, 10:56:08 AM
-
Hello,
I have a photonscenceinstantiate monster and everything works well with the master client controlling all aspects of its movement and then clients sync to that info.
My issue is when I try to send an RPC to a targeted (by name player) to deal damage using Photon View RPC Broadcast Fsm Event To Player it does nothing?
If I use Photon View RPC Broadcast Fsm Event it works but it applies damage to all players?
Can anyone tell me where I am going wrong? is this a shortfall of using scene instantiated objects?
-
Hello,
I use "Photon View RPC Broadcast Fsm Event To Player" too and it works, maybe the name is not correct? Do you get the name as string at runtime or put it there manually? If it's manually the player might have a "(Clone)" next to its name when he is instantiated.
-
Hi Thank you for replying.
I am using Photon View Get Owner Properties, which changes from the name of the object "player:ME" to a string "Guest 2308" (for example) and then using Photon View RPC Broadcast Fsm Event To Player and sending to string name "Guest 2308". I can send this event from a playerinstanciate but not a sceneinstanciate for some reason? Am I missing something obvious
-
Have you tried this action specially for sending to players "Photon View RPC Broadcast Fsm Event To Player"?
I have not used with the regular RPC action and setting the name like that...
Maybe the dedicated action will work for your setup too.
EDIT: Oh wait I just noticed it is that action... let me double check where I get the player's name
-
Hi,
Yes I can confirm I am using "Photon View RPC Broadcast Fsm Event To Player", playmaker is just truncating the name on my display.
Have you tried specifically from an instantiatedSceneObject as it is fine everywhere else for me.
Thank you!
-
Hey yes you are right, it won't work. Because you send it to your self (the master)? Scene view objects belong to the master client, so you can do a check if the player isMaster send a regular global event, if other - send this RPC.
Sending from scene object to joined (not master) player works.
-
You are literally the very best! thank you so much for the help, I will test it out later and let you know how I get on!
Much appreciated!
-
No problem, happy to help _ Playmaker + Photon <3 ;D ;D
Good luck!
-
Ok wow so it works! now I have AI that can damage a player, great......but......
How do I send events from the non-master clients to the AI's controlled by the master? as in how does a player (non-master) send an event to a specific individual scene instance for damage.
I have tried using broadcast to player using the AI as the name but it doesn't seem to work. Do I need to do some sort of broadcast all and then filter with the string data?
Help is so massively appreciated!
-
Actions:
Photon View Get ID
Photon View Find By View ID
Get the AI id, send it to the master, master finds it and does an event. Something like that ;)
-
Hi, thanks for all the help, all solved, got ICE Creatutes working well in a photon multiplayer environment now. Hats off sir!