I entered the "A Game By It's Cover" compo. I'm doing Spy vs. Sniper:
http://forums.tigsource.com/index.php?topic=13512.0 In the game, in the final level, I may have up to 100 "people" objects scrolling in 4 directions, with about 20 to 30 "prop" objects (trees, bushes, etc) on screen. As you can see the game is pretty much isometric. I need to make sure that objects are at a specific depth per _y coordinate. So if the y coordinate of a people object is 1 less than the y coordinate of a prop or other people object, it will properly show up behind. I was thinking of assigning depths as follows for moving objects:
this.swapDepths(_y);
As the y coordinate increases, so does the depth... er well the depth decreases.. you know what I mean.
Is it safe to do that? There is a possibility that multiple objects could share the same depth at any given time. Save for one dynamic object that gets attached to "people" objects (the briefcase... if you read through the game description and posts), no moving object ever gets removed - they continually stay in play.
I'm still very much a beginner at actionscript, so please don't bite off my head if this is a stupid depth cheat that won't work.
Thank you for your time.