rbvjr81's Recent Forum Activity

  • My advice is to add a JSON project file and load it with AJAX. Then you can use a dedicated editor for your JSON data without having to worry about how to properly escape JSON strings in expressions, which is quite fiddly.

    Thanks Ashley!

  • Construct only understands numbers, strings and booleans. You need to quote the whole thing to pass it as a string.

    > '[{"key":"username","value":"JohnDoe"},{"key":"email","value":"test@example.com"}]'

    In your plugin code you can then use JSON.parse(your_string) to transform the JSON string into a JSON object.

    About quotes... make sure the outermost quotes are different to the ones used in the JSON object. In this case I quoted the whole thing in single quotes, that way the computer can easily understand that everything in between the single quotes should be a string.

    If for some reason you wanted to use double quotes in the outermost layer, you would need to escape the double quotes in the JSON string so they are interpreted as the raw character instead of their special meaning and it would look something like this

    > "[{\"key\":\"username\",\"value\":\"JohnDoe\"},{\"key\":\"email\",\"value\":\"test@example.com\"}]"
    

    In my opinion you should only do something like that if it's absolutely necessary.

    Appreciate your help Diego thank you very much!

  • Hey guys! First time trying to create C3 plugin and having issues with JSON input in action parameters. When I try to enter this JSON in an action parameter field:

    [{"key":"username","value":"JohnDoe"},{"key":"email","value":"test@example.com"}]

    I get syntax errors at certain characters like:

    The opening bracket [ The @ symbol in email addresses Commas , between objects Is there a proper way to handle JSON input in plugin action parameters? Or do I need to use a different approach for complex data input? My plugin accepts a string parameter that should contain a JSON array, but Construct 3's parameter system seems to have issues with these special characters. any advice on best practices for handling structured data input in plugin actions? tried escaped string format too but same. Maybe I'll just pass it as variable? :/

  • As the title says - is it possible to have transparent background for windows/macOS exported game?

    Wherein player can see their desktop screen.

    Thanks

  • As far as I know, getting whitelisted is the only requirement. In my own testing that was the only thing I needed to do. I wasn't too clear in whether the process is fully automated or if there is some form of manual reviewing going on though.

    I don't know if you strictly need to have existing traffic, but I think it weights in the review process, that is what I meant in the first post when I mention you need a "real" website. I am not sure what would happen in the case of submitting a brand new website that looks nice but has little to no exposure.

    As for iframes, I tried this out myself to be sure what was going to happen. I did this by placing my whitelisted website in an iframe in another website I made which is not whitelisted.

    The results where, interesting...

    Initially it didn't work, as expected because the website iframing the original content was not whitelisted. But I found out that if I navigated in the iframe to other parts of the contained website, then ads started to work in it. I mentioned this to people at Google and they told me that shouldn't have worked. So I am thinking that at one point or another they will fix it.

    DiegoM - is your whitelisted website in Wordpress? afaik Adsense only accept sites with the usual blog structure (with About Us, Contact, Privacy etc). Since C3 is not a site builder, then we all have to iframe it on a CMS?

    H5AdsEngineer - would Adsense recognise if the site is submitted as a game rather than a blog website for whitelisting?

  • Hi - Want to know how to apply unique sprites on each animation frame. I was only able to do it on Animation Frame 0 via child.

    Appreciate your help in advance

  • thank you both!

  • I want chat room to be limited to host and 2 players only - are there any ways to do that?

    thanks

  • I figured out the issues. CORS was not configured on the API to accept calls from preview.construct.net. This resulted in the the browser rejecting the OPTIONS call. Once I fixed that, construct then completed the OPTIONS call and followed it up with the POST call.

    Mind sharing how you configured your API to accept calls from preview.construct.net?

  • Hi - I'm receiving dynamic JSON data from API endpoint

    sample response:

    { "success": true, "error": null, "data": [{ "id": 9164, "name": "Gilberto", "name_short": "Class Clown", "desctription": "Graduated 2004", "picture": "https//:imgur.gif", "link": "https://www.google.com", }, { "id": 2149, "name": "Jose", "name_short": "Captain Virtue Signal", "desctription": "Graduated 2000", "picture": "https//:imgur.gif", "link": "https://www.bing.com", }, { "id": 6666, "name": "hAcKerMans", "name_short": "White Knight of Keyboard", "desctription": "Graduated Whenever he wants", "picture": "https//:imgur.gif", "link": "https://www.facebook.com", } ] }

    Questions is, how do I parse select data to C3 Objects (eg. "name" to text, "link" to button/sprite, & "picture" to sprite.) if they constantly change?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sorted - thanks Laura

  • How did you fix it? - got one failed purchase too

rbvjr81's avatar

rbvjr81

Member since 11 Nov, 2019

None one is following rbvjr81 yet!

Trophy Case

  • 5-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies