How can I set a value in my grid (for example address : grille[4][5]) directly in a loop? I would like that grille[4][5].yScale and grille[4][5].xScale are smaller than the others.
grille = {}
local colonnes = 8
local lignes = 15
local variable = math.random(1, 10)
local rectx = 30
local recty = 30
local grillescaley = 0.35
local grillescalex = 0.35
local espacement = 2
local ecartgauche =10
local ecarthaut = 50
local image = "myx.png"
for i = 1, lignes do
grille[i] = {};
for k = 1, colonnes do
grille[i][k] = display.newImage(image)
grille[i][k].yScale=0.35
grille[i][k].xScale=0.35
grille[i][k].alpha = 1
grille[i][k].x = (k - 1) * (rectx + espacement) + ecartgauche
grille[i][k].y = (i - 1) * (recty + espacement) + ecarthaut
end
end