W
whale_cancer
Guest
Hello!
In my map editor, I create a number of buttons out of background resources. These buttons are then used to set what the current brush is. This all works like a charm, but in order to do this I need to use an array for each and every background in order to hold the sprite_indexes created during this process. Thus, I have a chunk of code to initialize it that looks like this:
I am going to need to make 7 more sets just like this in order to hold all my resources.
Is there a way to have some sort of array of arrays hold this information? So I don't end up having to define and handle 64 arrays?
Edit: One huge array in order to store ALL the sprite_indexes has been ruled out, as I believe it would end up making referencing those indexes harder. I may try it if there are no other solutions.
Edit2: To restate the issue, I would ideally like to be able to reference my data by a 2d array which itself points to another 2d array without having to manually define all 64 arrays. Is this possible?
In my map editor, I create a number of buttons out of background resources. These buttons are then used to set what the current brush is. This all works like a charm, but in order to do this I need to use an array for each and every background in order to hold the sprite_indexes created during this process. Thus, I have a chunk of code to initialize it that looks like this:
Code:
for (r = 0; r < 10; r += 1)
{
for (c = 0; c < 9; c += 1)
{
tileSprites00[c,r] = 0;
tileSprites01[c,r] = 0;
tileSprites02[c,r] = 0;
tileSprites03[c,r] = 0;
tileSprites04[c,r] = 0;
tileSprites05[c,r] = 0;
tileSprites06[c,r] = 0;
tileSprites07[c,r] = 0;
}
}
Is there a way to have some sort of array of arrays hold this information? So I don't end up having to define and handle 64 arrays?
Edit: One huge array in order to store ALL the sprite_indexes has been ruled out, as I believe it would end up making referencing those indexes harder. I may try it if there are no other solutions.
Edit2: To restate the issue, I would ideally like to be able to reference my data by a 2d array which itself points to another 2d array without having to manually define all 64 arrays. Is this possible?
Last edited: