How do I use Arrays with .json?

0 favourites
  • 4 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Hello there!

    I just bought Construct 3 today and i´m reading all the information and help for the stuff I want to learn. I´m not a beginner in programming and developement, just would like to learn some things here.

    So my goal is to have a generated name with 2 arrays (Name 1 and Name 2 (Like first given Name and Last Name)

    I created 2 arrays as 2 .json files. One with names that I would like to have first and one with names that I would like to have after Name 1.

    Destination would be like:

    Pick random name from .json Array 1, set text of "Object" to generated Name 1, pick random name from .json Array 2, add text of "Object" from generated Name 2 or so...

    Any related topic with this or some help? Would be great!

    Thanks in advance =)

  • If you are using the Array.json file, you will need an AJAX object to request that file, then use the AJAX objects LastData Property to Load the Array using the Array.Load Action

    here is an exmaple:

  • Thanks for the quick reply!

    So I did what you show me in your screenshot, but I can´t see the content of my array in my array widget, did I something wrong?

    I thought if I load the AJAX last data information into my Array Widget, there would be those values

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Got it! I only needed to load it after it completed the loading! :D

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