Hey! I am making a tile game map editor, and i want to save a map. I would like my editor to be able to load a “copy and paste” code, but i dont know how. Here is an example of the code generated by my editor. Each number is a tile type.
level_array = [[1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,2,1], [3,1,2,1,1,1,1,2,2,1], [6,6,6,6,6,6,6,6,6,6] ];
In the load window, there is a text box input where you can paste this code. My problem is that I don’t know how to transform the pasted text in an array.
Any hint?
Free egg for anyone who helps me!