Here is a sample of a grid I populated with a sprite, it’s a simple square grid and I want to make every other column(2,4,6,8) offset by half the sprites height. I can’t find any examples for this so If anyone could show me how to?
Also my next step is to make the grid into hexagons, has anyone done that here?
[code]
_H = display.contentHeight;
_W = display.contentWidth;
local Grid_Width = 9;
local Grid_Height = 10;
for row = 1, Grid_Width do
local orbTypes = {}
for column = 1, Grid_Height do
orbTypes[column] = display.newImageRect(“orb.png”, 32, 32)
orbTypes[column].x = 0 + (row*32)
orbTypes[column].y = 0 + (column*32)
end
end
[/code] [import]uid: 34126 topic_id: 7721 reply_id: 307721[/import]