How to make Personal Chat within a room?
Options
Hi,
I am using photon plugin for enterprise server, and Javascript in client side. My players are able to join a room and chat with all others in that room. Now I want to make a option for personal chat also within the room. This means after joining a room, player can send personal message to any member of that room. Is this possible in Photon? If possible How can I Achieve this?
I am using photon plugin for enterprise server, and Javascript in client side. My players are able to join a room and chat with all others in that room. Now I want to make a option for personal chat also within the room. This means after joining a room, player can send personal message to any member of that room. Is this possible in Photon? If possible How can I Achieve this?
0
Best Answers
-
Hi @soumen_rjs,
If you want to send a message to a single actor then it should be possible to select target actor when raising an event.
Otherwise I could not get what you want to achieve.1 -
5
-
According to js sdk documentation, array of numbers should be passed as 'targretActors' in 'options' parameter: { targetActors: [actorNr] }
1
Answers
-
Hi @soumen_rjs,
If you want to send a message to a single actor then it should be possible to select target actor when raising an event.
Otherwise I could not get what you want to achieve.1 -
Thank you @JohnTube
This is exactly what I want. Can you please share a piece of code for selecting the target actor while raising the event
Now I am using this: raiseEvent(1, { message: "Hello", senderName: this.myActor().name });
This sends message to all actors. But I want to send this message to only one actor0 -
I have used: raiseEvent(1, { message: "Hello", senderName: this.myActor().name },{targetActors:actrNr});
where actrNr is the actor number. Now no message is delivered to anyone when I am using the targetActors Parameter. Am I doing something wrong?0 -
5
-
0
-
According to js sdk documentation, array of numbers should be passed as 'targretActors' in 'options' parameter: { targetActors: [actorNr] }
1 -
Thanks a lot @vadim0