Magistross's Forum Posts

  • There's no need for that. My method uses an array of javascript objects. You can store pretty much anything you want.

    I expanded my exemple so it can save objects type and 3 random variables.

    Used well, JSON is the better alternative for all you data needs.

  • Well to be fair, JSON as a whole can be described as a bunch of strings slapped together. :P

  • You are saving a simple collection of objects properties, so this shouldn't be as complicated.

    Here's how I'd do it : drive.google.com/open

    You could save a lot more properties than x and y, but for the purpose of my exemple, I saved only those.

  • Just went through the SDK doc, and indeed, it was all explained there :

    construct.net/en/make-games/manuals/addon-sdk/reference/specifying-dependencies

  • C3 loads plugins script file dependency via the DOM, and I believe workers don't have access to said DOM. That would explain why "Easystar" is undefined in this situation.

    I'm not sure how to deal with this, perhaps Ashley or Nepeo could enlighten us a bit.

  • And indeed runtime was undefined ! You've got to be weary, that variable is not in the global scope, so you must pass it along like you discovered.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is "runtime" defined in the context where the script is ?

  • Weird that such a feature is under "System" and not a common condition like many other.

  • There is no "Is overlapping point" condition. However, you could probably create a single pixel collision "polygon" and do your test with this object. A caveat is that you need to move this object for every check you want to do.

  • The JSON object doesn't have an exposed API yet, so you can't manipulate it in scripts. You could however ditch it altogether work solely with scripts for your JSON needs.

    First load the JSON file with AJAX, then set a local or global variable to AJAX.LastData.

    Inside a script, you could then parse said variable and store the object inside the runtime for later use.

    runtime.myArray = JSON.parse(runtime.globalVars.json);

    That new "myArray" attribute of the runtime could then be filtered using the filter() method.

  • To your second question in your original post :

    If, say, you want to know the name of the third member of the first raid you'd use a path like so :

    raids.0.raidMembers.2.name

    If you want to access raid members data by ID, I would suggest you used some sort of helper function.

    Like so : drive.google.com/file/d/1o5Ndw6T_vsmWHeTZA-rCAJTjmfsBiXhq/view

    The function can either return all data as a small JSON or a particular key provided a raid id, member id and an optional key name.

  • Couldn't have worded it better. This behavior is more of a "helper", it cannot actually move objects.

  • The Browser object's "Is Online" condition may come in handy to only fetch your images if the user is actually connected to the internet.

    Not sure how robust is the "online" detection mechanism but it's worth a try.

  • Here : drive.google.com/open

    It's quite basic, a tilemap with a single tile, draw some shapes and it'll act as obstacle. I used "Solid" along with "Platform" sprite to demonstrate.

  • You might be able to come up with a hack doing what you are describing using a tilemap and its new r179 feature of disabling the collision polygon from certain tiles.

    edit: Absence of a tile is also treated as non-colliding, so it could work with prior versions if you don't need non-colliding tiles to draw your shapes.