COGames's Forum Posts

  • When a sound is in a subfolder, it's not playing when "played by name" is used.

    When it's just play, and the file is selected from the list, it does play.

    Link to cp3 file

    1drv.ms/u/s!AobC4q3rBlr639Z5NmTekt0JWfFrrQ

    Edit to add:

    I noticed if I did a file path(see image below), then it works. However, I have never needed to do this before.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Thanks! I had no idea that BBox existed!

  • Thanks :)

  • You do not have permission to view this post

  • You do not have permission to view this post

  • It will work if I load directly into the text object, however, it comes with a lot of escape characters and spaces added. If I use the json parse then it gets rid of the escape chars (but I'm finding the extra spaces are still there). Note that I'm getting the data from mySQL database. The data started out in C3 as arrays that I put into a dictionary and then stored in the database. When I retrieve it, it's filled with many escape chars.

    Originally, I did this, and removed all added \ and spaces, and it worked, but it seemed messy. I guess I'll have to do it this way, it just seems so wrong.

  • Tried turning off "Enable BB code", it still did not work. Also tried a text input and it did not work.

    The thing is, in the debugger, I can copy the text from the JSON instance data and paste it into the text object. Then my code continues on and works fine (loads up a dictionary). This has to be easy to do in C3, I just have no clue how to do it. I tried to do this with a script, but I'm no javascript programmer and of course that didn't work for me.

    I really didn't want to loop through with keys and such to load my dictionary (seems to be confusing to me).

  • Did you wait for the AJAX request to finish before trying to parse ajax.lastdata?

    Yes, I get the data (see the image). Now I just want to throw it into a text object. I think there's something simple that I'm missing, but I tried all different ways.

  • Is there a way to put the parsed json string into a text object? I just want to dump it in there. The image below did not work.

    Tagged:

  • Is there a way to load up a text object with the parsed JSON? What I have in the image below doesn't work.

    I do know that I can loop through the parsed json, but I don't need to do that.

    Tagged:

  • I'm sending a C3 array to a (mySQL) database. Then I want to retrieve it with C3 and restore the array.

    The array is width=4, height=1, depth=1.

    Array: x(0)="rat", x(1)= "elephant", x(2)= "lion", x(3)= "sloth"

    When I send it to the database, I see it gets stored as below. Note the extra brackets (does this mean the animal names are in their own array?).

    {"c2array":true,"size":[4,1,1],"data":[[["rat"]],[["elephant"]],[["lion"]],[["sloth"]]]}

    Then I use AJAX to retrieve the data. From C3 (and when I use postman), I see the data is retrieved with escape characters.

    "{\"c2array\":true,\"size\":[4,1,1],\"data\":[[[\"rat\"]],[[\"elephant\"]],[[\"lion\"]],[[\"sloth\"]]]}"

    I'm at a complete loss on how to put the data back in the original array, so it's just like when it was stored. Any help would be very appreciated.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads