Twitch.tv Chat integration & Viewer list example.

Get help using Construct 2

Post » Mon Mar 28, 2016 3:05 pm

I made an example project, which demonstrates how to connect to Twitch.tv channel, send and receive messages, and fetch viewer list using Websockets and Ajax object.

It uses Yann's JSON plugin for parsing viewerlist json.

http://bit.ly/c2twitch_example
Last edited by kAlekki on Tue Apr 19, 2016 7:33 pm, edited 3 times in total.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Mon Mar 28, 2016 3:48 pm

Where is your CHANNEL variable assigned?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"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
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Mar 28, 2016 3:51 pm

-
Last edited by kAlekki on Mon Apr 18, 2016 2:28 pm, edited 1 time in total.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Mon Mar 28, 2016 3:58 pm

I think your compare condition might be screwing with stuff too, I would remove that altogether and see if it works. The WebSocket.MessageText == PING... one. Make it so that it sends the message regardless of what is typed into the box. No need to be artificially constraining yourself when you are debugging.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"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
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Mar 28, 2016 4:06 pm

-
Last edited by kAlekki on Mon Apr 18, 2016 2:28 pm, edited 1 time in total.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Mon Mar 28, 2016 4:07 pm

Well, you will replace that eventually (or rather get rid of that PINGPONG message altogether) once it is working... I think it is working right now, based on your Construct code. It doesn't send your PING message because of the code. You specifically tell it to ONLY send the message IF the message equals EXACTLY: "PING :tmi.twitch.tv", so if you just type in "PING", it will fail to send that message.

It will still send your other message (the sendInput.Text one) though, which it does, but only when you click the button (not if you press enter).
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"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
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Mar 28, 2016 4:42 pm

-
Last edited by kAlekki on Mon Apr 18, 2016 2:28 pm, edited 1 time in total.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Mon Mar 28, 2016 7:42 pm

Well, from your screenshot it looks like it connects and sends messages fine. I guess I don't see how you are having problems when it does exactly what you tell it to.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"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
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Mar 28, 2016 7:52 pm

-
Last edited by kAlekki on Mon Apr 18, 2016 2:28 pm, edited 1 time in total.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Wed Mar 30, 2016 5:09 pm

-
Last edited by kAlekki on Mon Apr 18, 2016 2:29 pm, edited 1 time in total.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Next

Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 12 guests