bood's Recent Forum Activity

  • Eren

    Is it normal for it to eventually lose the connection? I think it may be happening when the app runs unfocused. Am I doing anything wrongly? I need an app to be constatnly connected to Twitch chat even when the user is playing another game, is this posible?

  • Hi,

    I think I can help you, have you an email for contact you?.

    Kind Regards

    Tomkart Games

    Thank you very much for your offer, but Eren helped me already, so it's done :) .

  • I forgot to write "#" before my channel, now I succesfully connect and get the full message with "Welcome, GLHF!", "You are in a maze of twisky passages, all alike.", etc. , but still the text object doesn't change when I write in the chat.

    EDIT:

    Done, thank you very much!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, thank you very much, Eren, this finally looks like the right way to go, but something is not working yet. Since I'm not used to work with logs, I used a text object:

    As far as I know, this should change the text of the text object every time any user writes in my chat, yet all I got all the time, not changing, is the following:

    "@badge-info=subscriber/26;badges=broadcaster/1,subscriber

    :tmi.twitch.tv USERSTATE #justvoiceandgames"

    I've tried my nick with it's caps and with all lower case, it's just the same.

    Do I have to be steraming for this to work? Any idea about what am I doing wrong?

    Edit: After some time, I guess about 5 minutes, text changes to:

    "PING :tmi.twitch.tv"

  • Hi,

    I've heard that it is posible to connect a c3 project with Twitch chat using websockets. I know nothing about websockets so I can't do it myself, therefore what I need is simple:

    I need a c3 project that reads every Twitch chat input and sends that info to a function. I will take it from here so that the function reads the info given and understand which viewer said what.

    Thank you.

    Tagged:

  • Hello, AnD4D.

    I'm very interested in having a C3 project that receives the chat from Twitch. I've been making games with C2 and C3 but I have absolute no idea about things like websockets, so I tried to understand your conversation here and in another thread but I couldn't. Do you have any project to share or a tutorial to link about that specific action? I already have made a game, I just need it now to analize the chat from Twitch.

  • So I could talk to a friend of a friend and we managed to get this working:

    document.querySelector("#alert-container .text-wrapper .letters").innerHTML

    But only when inspecting. When added as a script, it will just give a "null" value.

  • Well, it doesn't work, and I can't create a JS function inside the iframe, as I'm using an URL to target to another domain.

    I've been told that this is about CORS, that I won't be allowed and nothing can be done. Is that it? Even when the info is shown in my project after it loads and I can select the text with my mouse and copy paste it, I can't do that with some JavaScript script?

    I'm thinking now about a quick "select text" to paste it to a textbox with the COPYCLIP plugin so that I can acces to that text from the texbos. It may not be an elegant solution but it can do the job I wanted to do, although this would change my question completely:

    Is there any quick way to select the text shown in an iframe?

  • The iframe is inside the game.

    I hadn't found that demo till yesterday, but that's the one that taught me that I could call it by it's id. It's a very good demo and gave me a better understanding about what's going on and what am I doing (I'm not a javascript programmer), but I can't still get that string and store it in a variable.

    I don't think the problem is about storing. I can store any defined string using JavaScript, something like :

    runtime.globalVars.New = "Hello."

    Works fine. But, for some reason, I can't get anything inside the iframe. I've tried to use getElementsByClassName(), getElementById and now this contentWindow, but nothing is working. It's really weird to me as I can select with mouse and copy the text inside <span class="letters"> while on preview, so I think it's working fine as HTML code... but I can't acces to it using JavaScript somehow.

    Thank you very much for your time. I'll be thinking about this again today as I need to solve it for a very important project.

  • I can't execute JS code when the value is updated in the parent page.

    I found some youtube vide about iframes and changed it a bit. Now I have this:

    If I chain something like "ok", I get "undefined" as the value for innerText. If I chain no other value, I will get an empty value.

    "streamloots" it's my iframe Id.

  • I've got some lines on a <span class="letters"> that get updates from a remote server.

    And I want to register those updates on a global variable to work with them, so I'm trying to use JavaScript to set the global variable like this:

    But it's not working.

    Does anyone know how to solve this or any workaround?

    Thank you.

  • I'd do something like this:

bood's avatar

bood

Member since 9 Sep, 2016

None one is following bood yet!

Connect with bood

Trophy Case

  • 8-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies