Grimmy's Forum Posts

  • Thanks Dop, I think I'm going to put all the save data into an array or dictionary during the loop and then just write the whole thing to local storage once the looping is done.

    I only avoided doing that because it sounded more complicated than just saving individual values, but having endured the pain of trying to save individual values during a loop, it sounds far simpler now (in theory at least).

    It seems that might be the recommended practice for good reason.

    Thanks

  • I've been trying all day with this without success.

    I am looping through a bunch of items and I want to change their colour depending on their save data. (on or off)

    When the 'For Each' loop runs and iterates through each item it does a Get Item based on the instance item i am at in the index( eg "Profile_"&ProfileButton.ID&"_has_data")

    The issue is that the data takes a little while to come through so it cant be in the loop itself.

    The 'On item' event which is ready to receive this is outside of the loop and therefore seems to be no way of referencing the looped item.

    eg this never triggers if I add a count variable to my loop which counts up with each iteration:

    + LocalStorage: On item "Profile_"&count&"_has_data" get

    This seems like it 'should' be very simple to do but I just cant figure it out.

    :( Help

  • I have a container with a bunch of objects. The original objects are arranged (rotation and position) so it looks correct as a complete 'contained' composite object .

    Now, when I want to instantiate this container it works fine, but all of those individual objects are now positioned at the exact same point in the new instance. A nicely arranged graphic is now just a mess.

    Am I doing something wrong or do I need to manually recreate the offsets of each item whenever I recreate an instance?

    Thanks

  • As well as bumping this, I'd also like to know the max size of a data array. I want to have an array of something like 7500 rows. Is that going to be okay/ quick enough to parse?

    Thanks

  • Is this even possible or is the array editor only to be used as a starting point/(read only at runtime) for arrays.

    I really want to be able to change the data in game then come back to the editor and view the saved/added data that was done during runtime.

    Is there some way to do this?..or a workaround?

    Cheers

  • [SOLVED]

    For some reason I need to do...

    JSON.Get("data.Data_URL")

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My config.json dictionary has some data in in like this:

    key:Data_URL value:some data URL stuff

    But when I try to load the data and display it like this....

    + System: On start of layout

    -> AJAX: Request config.json (tag "load config file")

    + AJAX: On "load config file" completed

    -> JSON: Parse JSON string AJAX.LastData

    -> Browser: Log in console: JSON.Get("Data_URL")

    ..it just prints "0"

    I expected it to print "some data URL stuff"

    What's happening?

    Thanks

    Simon

  • So just to clarify. The Access control stuff ALSO has to be on the server that I wish to get the image from?

    So its completely out of my control really and I cant just download images from any random URL??

  • Thanks. In the end I tried uploading to the server, but I still get the same issue:

    --------------------------------------

    Error loading resource: TypeError: "NetworkError when attempting to fetch resource." c3runtime.js:157:683

    _loadPromise pigobo.com/TestC3/scripts/c3runtime.js:157

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at dt7v1i9vyp3mf.cloudfront.net/styles/news_large/s3/imagelibrary/Y/YamahaMODX_01-SDD5y1TtYhJYVrTJyhwPqT3.IN_xgvgb.jpg. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

    --------------------------------------

    I have no idea why because there is a .htaccess file in the root of my directory with:

    Header set Access-Control-Allow-Origin '"*"
    

    -Both my site and the request site are https:

    -I tried both in Firefox AND Chrome

    ..so I have no clue as to what is happening. I've been trying all day in various ways to get this to work :(

    Any ideas?

    I want to get this working without any additional PHP.

    Cheers

    Simon

  • Its preview mode..testing on my PC with no servers etc but I'm trying to pull images from online.eg. >>https://www.someimage.png I'm not sure what applies.

  • I know the help says that my server must have cross domain stuff but it doesnt make sense because when I'm previewing my game I haven't even uploaded it to a server.

    Is it possible to preview without having to build and upload my game to a server? I want to just preview the downloaded images.

    Is this possible, or am I required to upload my project to an online server evertime I want to test it?

    CHeers

  • Using this latest version of the plugin with C3 the data on the x is always offset by one. So if I try to get data from x1/y1 it gives me data from x2/y1. This is the name if I grab the CSV numerically or using a string of the column name.

    More worrying is that if I return RowCount or Column count the data gets completely lost for some reason and I am forced top load it all in again. This makes no sense.

  • Hi, I'm thinking of having an iframe with 3d content (maybe created with Three.js or something else) but how would I go about communicating events from the iframe to C£. Is this even possible? Would I use Iframe at all or should I somehow write my own JS in C3 to import Three.js libraries etc.

    Any high level answer is welcome as I'm just toying with ideas on how to integrate simple 3d in C3.

    Thanks!

    Simon

  • Would it be possible to create an app in say Three.js and then display it in an iframe in C3. Then is is there an easy way to communicate with the iframe to and from C3?

  • No errors in the log. I also made a build to test it but the whole speech recognition stopped working completely.

    :(