Hey.
So this is a general algorithm question. I don’t need the code, I just need the idea of how to do it.
So I have a 2D array, and I am storing values in it. It’s a bit weird, so bear with me here:
I have some variables, that take a single cell. That is a standard array value.
I have other variables, that take 2 cells. I can’t store the same variable in 2 cells, because that would mean two single cell variables, and I want a single variable that is stored in 2 cells.
Then I have even larger 4 cell variables. Again, I can’t store this variable in all 4 cells, cause then all the other algorithms will read it as four single cell values, and I don’t want that.
The best way I can explain what I want to do is something like this:
I still can’t save 4 ID values in 4 different cells, cause when I use a for loop for something I will end up with 4 different objects instead of 1 object…
I am not sure I understand…
So you are telling me to build another array that will store the variables and their location in the main array.
But when I go to the main array and try to visualise the other array I bump into the same issue…
To use my example as an example, a dagger is stored into A1 and A2, but when I try to visualise I read A1 - dagger, A2 - dagger. So I end up with 2 daggers…
I am not making an inventory by the way, but that is the best visualization of what I want to do…
The two arrays you want me to make are basically the same, just stored in a different way…
I can’t wrap my head around it.
Oh… Ooohhhh… I see what you mean now…
I can add extra cells to the main main array for extra info to help me with the visual array that I will use only for visualisation…
OK, that IS an idea I can try and use. OK, I will spend some time trying to implement that and will be back in a couple days with an update eventually maybe.