I am very new to this isometric stuff and decided to take a shot at it to see what I can do, and followed Tonypa’s trusted isometric tutorials to get started. Up till now I was doing a fairly good job, but I am having trouble with the swapDepths() of my Hero and Tiles on the stage. The problem is the Hero is behind the Tile when standing on the top most of the current tile it is standing on, and it works as expected when the Hero is on the bottom half of the Tile.
I attached a sample photo to show what I mean by ‘behind’, or underneth would be a better word I guess.
This is what I have on my building the Tiles on the stage function:
game.mc.attachMovie(“Tile”, “t_” + i + “_” + j, ((j+i)game.ts/2300+(j-i)*game.ts+1));
Where game.ts is 60. On the Hero walking function I have this line of code determining the new depth to swap with
var d:Number = (mc.yiso-((game.ts-mc.height)/2)*300+(mc.xiso)+1;
Both of these lines of code are the same from what Tonypa shared when calculating the depth order, but his is working and mine isn’t. I appreciate any help get me around this, thanks in advance.