How do I get multiplayer private messaging to work?

Get help using Construct 2

Post » Mon Jun 08, 2015 6:55 pm

I try and stay out of the forums since I'm quite the newb...but after a week of trying this I'm stumped.

After reading and playing around with multiplayer chat I've got the signalling down (relaying through host). However, when trying to PM through the host I can't figure out how to tell the host who to send the message to.
Multiplayer>>Send to peer "", tag "chat" message and mode. Understand this relays to the host, what I don't get is how to signal the host to relay this to a specific player in the room. Is there a capx that anyone knows of that explains this in detail? I figure there is some info I'm missing (as in I see on the tutorial the section for /pm username msg, I've tried a thousand variations and no luck). Thanks
B
11
S
2
Posts: 33
Reputation: 651

Post » Tue Jun 09, 2015 3:27 pm

I have been fiddling with this too.

This post contains messages sent back and forth from the "Multiplayer Test client" project that is built into Construct.
viewtopic.php?f=147&t=136306&p=922867&hilit=ws+chat#p922867

I tried to reverse engineer the message structure, but I have not taken the time to build a Java-based Web Socket server.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Tue Sep 15, 2015 6:22 pm

I'm messing with a diff messaging issue and think I figured this out but havn't tested it...
PEER: on peer message "" "tag" "/"&multiplayer.peeralias (or ID)&"|"&"Hello, this is the message"
HOST: on peer message set a variable to tokenat(multiplayer.message,0,"|")
and a variable to tokenat(multiplayer.message,1,"|")
(I'd use global variable set to text)
then just forward the message to peer
HOST: send msg "variable 1" tag"PM" msg variable 2
then just have it display in a diff color or some such but normal paste into text area

Hope that makes sense, seems like that would work fine (again havn't tested it).
B
11
S
2
Posts: 33
Reputation: 651

Post » Thu Sep 17, 2015 11:09 pm

Yea, it does. It should make my reverse engineering run a bit smoother, thanks.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Tue Sep 29, 2015 6:05 pm

Just an update...works peachy.
B
11
S
2
Posts: 33
Reputation: 651


Return to How do I....?

Who is online

Users browsing this forum: bilgekaan and 8 guests