At 12/12/05 11:02 PM, ImpotentBoy2 wrote:
i dont really think _x would solve that, although i guess it the object worked like a wall then it would be good.
the _x value just keeps it offset enough to fix the deletion problem. with my code, the only way two objects would be on the depth is if they were standing in the same square, which, with tile-based rpg setup, shouldnt happen in the first place.
but wouldnt it where if your depth was att 99 and a tree was at 100, wouldnt it switch the depths when your depth gets to 100, and not make them the same.
well, if the tree's _y value was 100, and the guy was standing at _y = 101 (closer to the bottom of the screen and the "camera"), his depth would be higher with my code. again, not perfect, but something decent.
ive never tried this but what i did b4 was give stationary objects even number depths and give the character odd number and increase in by 2 when it moves up. it worked good.
thats what i do. what you do with the objects themselves depths is your own business, but i find that using the odd-even method has ALWAYS worked for me. i actually used that for the depth field i made for my newest game.