How do I preset data to a file?

0 favourites
  • 4 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • I have a pattern that is made up of objects.

    The game will have different preset patterns and the player will be able to change between pattern1, pattern2, etc.. with a push of a button.

    Each object in the pattern has an X and Y value.

    Each pattern will have between 9-27 objects stored in it.

    So far I only have 1 pattern planned. I will be adding patterns as the game is more developed.

    I don't think I can preset data into an array.

    Should I store all the patterns in one file or would it be better if every pattern had it's own file to save memory usage?

    I know vaguely of JSON and AJAX.

    I just need to be pointed in a direction.

    How am I able to preset the patterns?

    Should I just create a Function for each pattern?

    It seems like it may be similar. It isn't read unless called upon.

    It would seemingly only increase the amount of events per tick a small bit and the download size.

  • I didn't understand what you actually mean with the pattern, but maybe you can just make a pattern editor which saves your pattern in the array.

    Then you can export the array as a JSON string and put that in a project file. You can load the project file later with the AJAX Plugin.

    I hope I could help!

  • I meant I have a pattern of organized objects and each objects has two values to store.

    There will be more than one pattern...

    Pattern 1






    Pattern 2






    Each x and y would have it's own value.

    Thanks I will look into that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do I export array to Json?

    It seems like I can open a Json file using a browser, but I'm not sure how to export an Array.

    Do I need another software?

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