Simplify the creation of multi-dimensional arrays
Closed this issue · 1 comments
Making arrays in GDScript is easy: var MyArray = []
But what if a variable needs to hold MULTIPLE bits of information (like X, Y, Z, Color, Packets, etc...) which would be much easier contained like this:
MyArray[X][Y][Z][Color][Pkt1]...
Currently, the process of doing this involves multiple lines of code:
for x in range(MAX_X): # This is the "X" dimension [width]
Map.append([])
Map[x]=[]
for y in range(MAX_Y): # This is the "Y" dimension [height]
Map[x].append([])
Map[x][y]=[]
#etc...
I'd MUCH rather like to see this defined as:
var Map = [][][][][]
or something to that effect.
Please consider.
Many thanks! (I LOVE the engine, by the way!!!)
- Mike
I commented on your other post as well, but in case you read this one first, bug reports and feature proposals should be made in the main godot repo found at https://github.com/godotengine/godot.
Love the enthusiasm though! Feature proposals are always welcome.