Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | sandheaver | |
Old Version | Published before Godot 3 was released. |
I can create a 1-dimensional array as follows:
var list = []
How would I create a 2-dimensional array? I can’t seem to find an obvious example in the docs or project examples. In Python I think it would be:
var matrix = [[0 for x in range(width)] for y in range(height)]
but this returns an error in Godot.