Ok I've kinda worked out how to use the Dynamic array. But I have a new problem now... Lol I'm not that experienced with arrays.. Say I have a 10 by 10 grid that I want to look like this:
I can save that as a *.csv file but when I open the file in Notepad it looks like this: 1,5, ,7,5,3,5, , ,9, ,7, , ,6, , , , , , , , ,8, , , ,8, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
All as one big line and it looks that way in Excel too.. Thinking of Excel, is there a way to open it so it looks like the first example? ie: it has separate rows, not just one big long line...
Hmm.. what's the difference between a boring old array and a dynamic array?
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
if you want to put it in a grid like format into a text file, i would suggest looping through the array and printing the value to a text file followed by ',' and insert a newline when its the end of an array row.
id have to fiddle around to get it to work but i think i can get you an example.
Oh nevermind lol I figured it out I'm making a level editor and when you insert tiles to the level it saves a certain value to the array in the correct location. You can define the size of the level (ie: the size of the grid) in the previous frame and the X value becomes Global Value X, so all I had to do was make sure the array's X dimension boundary was always the same as Global Value X, so you can have 12 x 13 grid or whatever and the array sets its dimensions and places everything correctly
Time to have a break lol too much coding is bad for your... uhh.. .... umm..... ... ... ... -zones out-....
i think its a better method anyway as you can have multiple arrays, and name them, in one text file and also have text based commands. string parser is a pretty amazing tool.
That just calculates the position in the Easy Grid where you just added a tile and then converts it to the corresponding position in the array. Global Value M's value is determined by what kind of tile you just placed, so in all that I can get an array with values that represent a level grid with different tiles.
no problem. if your way works thats great, but if it ever needs more funcionality like storing and retrieving other information into the text file along with the array then using the string parser is the way to go.