citron2010's Forum Posts

  • Thanks - I need to have play around with the JSON manipulation stuff.

    But the second part of the query was around how to get something like this example curl request working in the AJAX plugin.

    curl -X POST 'https://api.twitch.tv/helix/eventsub/subscriptions' \

    -H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \

    -H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz' \

    -H 'Content-Type: application/json' \

    -d '{

    "type": "channel.chat.message",

    "version": "1",

    "condition": {

    "broadcaster_user_id": "12826",

    "user_id": "141981764"

    },

    "transport": {

    "method": "webhook",

    "callback": "https://your-webhook-handling-server.com",

    "secret":"s3cre7"

    }

    }'

    Specifically the -d data part

  • Hi,

    I’m trying to build an app that subscribes to Twitch’s eventsub API:

    dev.twitch.tv/docs/eventsub/handling-websocket-events

    I’ve used the Websocket plugin to connect to:

    wss://eventsub.wss.twitch.tv/ws

    When I get a session_welcome message, I extract the session ID.

    What I then want to do is to use the AJAX plugin to send a request to subscribe to various events.

    (I know how to set headers for the AJAX request.)

    I have a template for this request saved as a JSON project file:

    { "type": "channel.chat.message", "version": "1", "condition": { "broadcaster_user_id": "xxxxxx" }, "transport": { "method": "websocket", "session_id": "YOUR_SESSION_ID" } }

    I can load this file using the AJAX plugin, but I’m struggling to:

    1. Once this file is loaded, how can I replace “YOUR_SESSION_ID” with the session ID returned when I connect to the WSS?
    2. Then how do I format this so that I can use it in the data parameter of the AJAX request?
  • Multiply those values by 100/255.

    I don't understand why though!!!

    😆

  • dop2000

    I have two objects for "global stuff" - a sprite (invisible, global) and JSON. The sprite is for variables I use often, and JSON for everything else.

    The sprite also has Tween, Timer, and LineOfSight behaviors, so I can run occasional timers/tweens or cast a ray when needed.

    Please could you expand upon this a little? What do you mean by "The sprite is for variables I use often" and how do you use the JSON?

    I understand adding Tween and Timer behaviours to some object as they can then be used anywhere else - I've always found it odd that Timers in particular had to be associated to an object and not just global.

  • Don't close the game window - when you click any of the Debug/Preview Layout/Project buttons in the editor, it'll just refresh the game using the same window.

  • Just happened on a different PC. Both Windows 10 & latest Chrome 132.0.6834.160

  • I had the exact same the other day.

  • Subject says it all - for no reason, the editor stops accepting keyboard input. Happened 4 times in the last 48 hours or so since I started using 424. Never happened before in previous versions. Only fix is to save and restart.

  • Yes - exactly as fedca explained! I was in a hurry - I'd spent some time preparing my sprite sheets and just wanted to import them.

    fedca's suggestion would work - or alternatively, disable the "import frames" button if there's nothing selected.

  • fedca - thank you - didn't spot that!

  • And can anyone help me run the previous stable version as a desktop app?

    I launch it in a browser from here:

    construct.net/en/make-games/releases/stable/r416-2

    Say not now when it wants to upgrade

    Add it as a desktop app

    It installs/launches automatically as v416.2, but when I reopen it, it's been updated to 424

  • Anyone else having problems importing sprite sheets? I see the new dialogue - select the frames I want to import, but nothing happens. Have tried different sprite sheets (one of which was working fine before the upgrade). Have tried an empty project too.

  • Thanks, R0J0! I'm trying to do it with Canvas instead :))

    I used a canvas layer for the baskets in:

    https://www.flippeeball.com

    The sides of the nets are each made up of three line-shaped sprites connected with revolute joints. The "knots" of the net are all sprites too and they're all connected up with distance joints - but distance joints are invisible so I draw between the knots using the canvas layer.

    As for your problem, I think this might work: make the spring from several segments connected with revolute joints. Then have two immovable/invisible sprites - one above the end of the spring and one below. Then attach distance joints from each to the tip of the spring. Actually, I think you might need a third - to the right of the spring's tip - to hold it taut.

    EDIT: Just realised that I don't think my solution will make the spring bend in a curve. Maybe you need multiple distance joints above and below. Or maybe you've solved it by drawing a curve that's not actually represented by a physics object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • alastair - many thanks for confirming all this - looks like I'll have to implement something similar to what you did!

  • This is really frustrating me - all I want is to be able to control a menu option cursor with controller D-Pads. I have two cheap PS1 lookalikes that report axis changes when the D-Pad is pressed (this happens in Construct, the Windows Control Panel applet, and in hardwaretester.com/gamepad on both Chrome and Firefox).

    But after reading this post, I now find that it's more common for D-Pads to report button presses - but even that seems inconsistent - the only other hardware I have access to are some Nintendo Switch joycons - for Left/Up/Right/Down, they report buttons:

    14, 12, 15, 13

    But Google's found the results for a "WII Classic D-Pad" is:

    12, 11, 14, 13

    (https://www.allegro.cc/forums/thread/608275/930495#target)

    And for a PS2 controller:

    15, 12, 13, 14

    (flickr.com/photos/73073372@N00/3896185001)

    So do I really have to take at least four different configurations into account?

    I feel that I must be missing some really obvious and simple way of handling this!