Trandoxiana
Member
Hi, so I am what I am trying to do is create a 2D array to keep track of collectibles. I have one collectible per level and my game is divided into 6 "worlds", with four levels each. I thought the best way to keep track of which collectibles were collected would be to create a 2D array with the world as the first coordinate and the level as the second, then set it to true or false depending on if it was collected. Where I ran into issues was trying to create this array with a controller object. It's fairly large, and if I'm understanding 2D arrays correctly, you can create them with something like:
However, with such a large array I though there must be a faster way to do this. Or is it simply that once you define one entry for the array you can add as many as you want without previously defining them? Sorry if this is long, I wanted to give as much context as possible
GML:
//array
my_array[0, 0] = false;
my_array[0, 1] = true;
my_array[1, 0] = false;
my_array[1, 1] = false;