So I’ve built a grid of tiles using a bunch of variables and arrays, but what do I have to do to make it isometric?
As a note, I’ve done a few searches on isometric games, but none of their placement methods have worked so far (I don’t know why).
var row = 0
var column = 0
var columnLocation = new Array()
columnLocation = [0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500]
var rowLocation = new Array()
rowLocation = [0, 50, 100, 150, 200, 250, 300, 350, 400, 450]
var tileList = new Array()
var i = 0
var mapContainer:MovieClip = new MovieClip()
addChild(mapContainer)
function addTiles(){
var tile:Tile = new Tile()
mapContainer.addChild(tile)
tileList.push(tile)
tile.width = 50
tile.height = tile.width
tile.x = columnLocation[column]
tile.y = rowLocation[row]
column++
if(column==columnLocation.length){
column = 0
row++}
}
for (i; i<columnLocation.length*rowLocation.length; i++){
addTiles()
}
Does anyone have any solutions?