Ajax not working

0 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi.

    So I started a main project a few weeks ago and I'm stuck because my arrays are not loading into the ajax plugin.

    It's a really easy task to setup which takes less than a few minutes - thanks to the help of members of this forum who helped me a few months back showing me how to do it.

    On start layout - ajax - load array.json

    On tag complete - array - load ajax.lastdata

    Whenever I load the debug preview the ajax is showing to have no data. And my 2 arrays are showing as width 10 which is inacurrate, as well as no data.

    I'm not sure what to do. I've tried moving the events to the top of the events sheet, i've deleted the ajax and arrays and started again. It's just not working

    I know there is nothing wrong withvmy events because I have started 3 new projects and made simple arrays and they are working fine in the preview.

    Could my main project be corrupted or is there somethinf I'm missing?

    Have I disabled somethinf that I shouldn't have?

    It's really frustrating because I can't move on with my project as the array function is so useful in so many ways for storing data although it is a steep learning curve for me.

    Just to note. I have 2 layouts and 1 event sheet. I don't think having a second layout would cause the events to not work properly.

    Thank you for any help :-)

  • In the start of layout, your AJAX is supposed to request a project file (not load the array), a JSON file within which there is the content of your array.

    construct.net/make-games/manuals/construct-3/plugin-reference/ajax

    First few lines of the AJAX manual article.

    If it still does not work, provide your project, this is the only way to accurately investigate what may be going on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    it's supposed to request array.json.

    I know my events are accurate because it works fine in other test projects I've setup but for some reason not in my main project.

    Is there anything specific that can stop it from working normally.

    If the project file is corrupted I may have to start again whih I dont want to do.

  • SOLVED:

    The layout wasn't assigned to an event sheet.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)