How do I get Ajax plugin options?

0 favourites
  • 7 posts
From the Asset Store
Shatter
$2.49 USD
Shatter effect, with parameters for crack size with an option for crack region and crack animation.
  • Howdy. I'm trying to add a new AJAX object (so I can populate an in-game array with the contents of a JSON file), but the AJAX options aren't appearing in the "Add New Object Type" dialog box.

    At one point in my project I was able to add an AJAX function...

    and my Addon Manager says AJAX is loaded...

    But for the life of me I can't figure out why I can't add more Ajax objects. Did the plugin get uninstalled somehow? Can I reinstall it?

  • You only add Ajax once, then use tags to identify the separate operations.

  • Right. But I don't see any AJAX options in my "Add New Object Type" dialog box. If it's added, why don't I see AJAX options there when I'm adding a new object?

  • It's global, you only get one.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Shouldn't I see an "AJAX" option in my "Add New Object Type" dialog box? (screenshot above)

    For example, the "Sprite" plugin is preloaded, so every time I need a Sprite I select it from the "Add New Object Type" dialog box and create a new sprite. Shouldn't I also have an AJAX option in my "Add New Object Type" dialog box .. so when I need to add a new AJAX expression I can do so?

  • No, you don't need multiple instances. The documentation explains that you use tags to identify each query.

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

  • FWIW, here's how I did it:

    1. Added LoadStructures (pulled in the JSON file), tagging it uniquely

    2. Added a new event to check when that uniquely-tagged LoadStructures event finished

    3. grabbed the .LastData value of the LoadStructures event (which was everything in the JSON file) and added it to my in-game array

    So tagging the LoadStructures AJAX object was the answer, but *referencing* that was the hard part to figure out

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