How do I include an array directly to my game ?

0 favourites
  • 6 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • hi , I want to know if it is possible and if yes how I can include an array directly in my game without write im in the start of layout , I have try to download it and load it when I start the game but that don't work so if you can heal me I will be enjoy ^^

  • You can download or save an array as JSON (basically represent your entire array as a single string), and then load hat later.

    Otherwise, if you are using a spreadsheet program to compose your data you can save to a format like .csv, include it as a project file, and parse it into an array with AJAX and the tokenat expression.

  • I have try to download , change the array , load him and download another time but the second dowload don't give me the modified array , just a blank array .

    I create this :

    on button1 clicked : dowload "array.json"

    on button2 clicked : load "array.json"

    So I clicked first on button1 , then change the array and clicked button2 and button 1 after .

  • Where are you loading from? AJAX?

    How are you changing the array? Are you sure that the array is not blank via the debugger before hitting download the second time?

    If you can provide a capx example of what you have done, it would be much easier to help you with your problem.

  • Are you using FileChooser and AJAX?

    Should work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thx I have find how to solve my probleme with ajax and request file

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