thanks but don't think it is what I asked for or I may misunderstood your code, my explanation was not clear enough...
it was more or less this dilemma... I have for example a 5x5 grid and I need to store those variables.
So if I type: grid[0]
it should return Vector2(0,0)
etc
sooo, that's the script I have so far:
var grid = [Vector2(1,5)]
for x in MAPW:
for y in MAPH:
tileMap.set_cell(x, y, 0)
var test = Vector2(x,y)
grid.append(test)
print(grid[2]) #error
print(test) gives me every coordinate I want, that's good but how do I append them to my grid array?
grid.append(test) does not work:
grid[0] returns the test example: Vector2(1,5)
grid[1] returns 0,0
grid[2] error.
there is some logic puzzle here and I cannot wrap my head around it.