Trying to create a new datatype that is essentially a 2D array, but the compiler/syntax checker would not let me access the array's entries with basic array accessor format, see screenshot:
Why is it like this?
Trying to create a new datatype that is essentially a 2D array, but the compiler/syntax checker would not let me access the array's entries with basic array accessor format, see screenshot:
Why is it like this?
In gdscript, only Arrays and Dictionaries get to use brackets. As far as I know, you can't make a class use them, since you can't extend either. Your best bet is to use a method.
class.access(x, y)
Or just make an Array of Arrays as a parameter.
class.array[x][y]