AndrejSoldo's Forum Posts

  • 14 posts
  • Hello, I'm trying to connect to my web socket server with javascript inside C3. Usually, I would use WebSockets action (WebSocket->Connect(URL, protocol)) and it would work fine but now I'm trying to do the same thing with js. I'm unable to understand API for objects like WebSocket and how to use it. I can log it

    const socket = runtime.objects.WebSocket;
    
    console.log(socket);

    but how do I use it now? socket.connect("url","protocol")?

    It would help me a lot if anyone can share how and where we can see the correct API to use with js since internal IntelliSense is really messy.

    Thank you!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for this, it sure is shorter as I wanted.

  • Hello, I'm new to javascript with Construct 3 so I just want to make sure if I get this right.

    I have one sprite object in my Layout and its called Enemy. On simple button click here is my code

    const inst = runtime.objects.Enemy.getAllInstances();
    console.log(inst);
    
    for(var i = 0; i < inst.length; i++)
    {
    	inst[i].x += 10;
    }

    Is this how it is intended to be used if I wanna move all instances of this object or is there a shorter way to do it?

    Thank you!

    Tagged:

  • The message part did not work for me so I did this and now its showing nick and message correctly. Thank you for that snippet.

    Shorter -> tokenat(WebSocket.MessageText,1,"#"&nick)

    imgur.com/gallery/6qT9BzK

  • One more thing Eren, how do you parse through that PRIVMSG. I wanna create sprite object for each player and show only latest text message that they posted above their sprite. I did manage to put them in dictionary but im not sure how to get only name and message. Is this done with tokkenAt?

  • If I could I would buy you a beer keg 50L right now. It works, thank you for your quick response. Much appreciated!!!

  • Thank you for this reply, Im just confused about oauth token, is that my client_id or? Where can I get that token if that's not my client_id from dashboard?

  • Hello, Im trying to develop Construct 3 game with twitch integration. so far I have managed to Connect my game with WebSocket plugin with WebSocket->ConnectTo->"wss://irc-ws.chat.twitch.tv" and on "On Connection Open"->Browser.Log("Connected"). But Im not sure how to proceed from there. I found this image "https://imgur.com/2jxoHhY" and its kind of outdated. Im not sure what I need to input for PASS USER NICK JOIN. I have created Twitch Application with dashboard. I have cliend_Id and secret.

    When I preview my construct 3 game in console it says Connected and "actions.js:5 :tmi.twitch.tv NOTICE * :Login authentication failed".

    Can anybody help with this one?

    Thank you in advance.

    Tagged:

  • I got error in my console saying that global leadeerboard is deprecated and that i should provide context for all leaderboards i create. This worked fone before they change this, i had working example but now its broken.

  • I dont know what you mean... can you explain? Give any kind of snippet? Anything that can actually help?

  • Hi to all devs here, I have a problem that I'm unable to load or set my Leaderboard that I have create in fb developers dashboard. Favebook has deprecated global leaderboards and now we need to provide contextID. When I try to console.log my contextID(InstantGames.ContextID) I got nothingin my console(blank). Does anyone know how we should provide that context or any info about it?

    Tnx

  • I got the same problem when using Photon official plugin with Construct 2 v.265. In editor everything is working great but when I export and upload game to the server (https://aetrixtestings.000webhostapp.com/) it says:Uncaught TypeError: Cannot read property 'ConnectionProtocol' of undefined at q.ba.k.R (c2runtime.js:324) at c.Hh (c2runtime.js:124) at XMLHttpRequest.wh.e.onload (c2runtime.js:92)

    I know its not your plugin but do anyone know what and how we can host games with Photon plugin inside?

    I have read the tutorials : construct.net/en/tutorials/how-to-build-a-multiplayer-game-with-photon-1124,

    construct.net/en/tutorials/full-round-based-multiplayer-1239

    and there is no solutions for this problem.

    Pls help

  • >

    > > Me too! error 'c2_callFunction is not defined'

    > > Help please.

    > > Thanks

    > >

    >

    > I think we are left here to struggle, no answer what so ever, 404 error for every capx download file, and not enough examples and clear guidlines.

    >

    AndrejSoldo

    Your original post was only a few hours ago ( scirra.com/forum/viewtopic.php ) and this thread is nearly 4 years old, so posting here is pointless.

    A little patience is required before you start complaining as many of the users who help come from very different time zones.

    I agree, but that just proves my point that no one has an answer for this question and I find it very frustrating because that's the last thing I need to implement and I'm stuck here for weeks. It's not documented well and most important of all I don't have 4 years on my hand to wait for it. please understand that this is very important for me and the forum is not very helpful. Tnx for understanding

  • .

  • 14 posts