Websocket chat messages.

Discussion and feedback on Construct 2

Post » Wed Nov 20, 2013 2:49 pm



Webscokcet my settings:

function init ()

end

OnBeat function ()

end

function onMessage (uid, msg)
broadcast (uid, msg)
return ""
end

onConnect function (uid)
return ""
end

OnDisconnect function (uid)
return ""

function onMessage (uid, msg) - Called When a user sends a message
- Uid (string): userid of user messaging server
- Msg (string): message received
sendto (uid, msg) - Send a message to a user by Their uid
- Uid (string): userid of who will receive msg
- Msg (string): message to be sent

end

This is the configuration of my websocket. What I search is the following:

The player presses a button, it sends a message such as "Hello" and the second player receives this message in a text box, and can respoder, to pressed another button.

How I can do this? I am crazy, trying to create this.
B
10
S
2
Posts: 205
Reputation: 1,619

Post » Wed Nov 20, 2013 6:50 pm

Closing, this is not an appropriate forum to ask this type of question. Try StackOverflow.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746


Return to Construct 2 General

Who is online

Users browsing this forum: jobel, rekjl, Yahoo [Bot] and 4 guests