Arrays in Construct

This forum is currently in read-only mode.
  • well... after a couple of days of feeling rather stupid, how do the arrays work in construct? I checked over the wiki and didn't really find much information and there were a couple of threads on arrays, but I couldn't get the example files to load. It just kept saying 'unreadable'

    Basically I want to have a 5 element, 2 dimensional array... so nothing complicated. I want to sort it, and save it so that next time I start up the program the same array is there. I had this working with a listbox, but I want to see if I can get it to work with an array. Just cause I'm trying to avoid doing what I should be doing today.

    I think this is probably excessively easy and I'm just missing something that gives me that 'ah ha!' moment... =P

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • An array is pretty simple to set up, just use the Array Object. You can set the height, width and depth in the properties to get the size array you want. The actions for the array handle inputting values, saving and loading data.

    I'm not sure about sorting, I don't think there's an automatic way to do it.

  • Just as an addition to UberLou:

    You indeed have to implement your own sorting algorithm. Also keep in mind that arrays are 1-based, not 0-based. To setup a twodimensional array of 5x5 you would use 5x5x1 not 5x5x0!

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