Posted By
|
Message
|
Kirby Smith Resident Slacker
Registered 18/05/2003
Points 479
|
9th September, 2003 at 21:55:48 -
I'm working on a project that is basically a top-down game with the illusion of height shown from a 3/4 perspective. <-- I hope that all made sense.
The Y axis serves both as an axis to move into the background and as an axis giving the illusion of height. All of the objects have reference shadows on the ground and are displayed at a distance above that determined by an alterable value in order to simulate height.
Getting to my question... I need to know how to make it so that an object in the foreground is displayed on top of an object in the background. I would just arrange them with the "set to front" or "set to back" options, but they will be moving into and out of the background. Is there any way to just write a piece of code that layers the objects according to their Y-axis value?
I had considered the possibility of having a thin horizontal line object that would drop down the screen every MMF loop by using the fast loop extension, setting every object it touched to the front, but it seems like that would bog down the framerate. Would that be the best solution, or is there a better way?
XBL Gamertag: Rampant Mjolnir
|
Rhys D Please enter a custom rating
Registered 02/01/2002
Points 162
|
9th September, 2003 at 22:02:40 -
Use the layer object and always set the y ordering to asscending or descending, i forget which one. Find the layer object on the object list which is available at the clickteam.com forums.
http://www.rhysd.com
|
Kirby Smith Resident Slacker
Registered 18/05/2003
Points 479
|
9th September, 2003 at 22:17:46 -
Awesome. I didn't even know such an extension existed. That will save me quite a bit of trouble.
XBL Gamertag: Rampant Mjolnir
|
DeadmanDines Best Article Writer
Registered 27/04/2006
Points 4758
|
10th September, 2003 at 04:42:28 -
Yeah, you can use an alterable value as the Z index, and then get layer object to arrange all of them in order of that alterable value.
Very cool extension.
191 / 9999 * 7 + 191 * 7
|
Rycon
Registered 20/09/2002
Points 996
|
10th September, 2003 at 19:23:50 -
Wow I always thought that would be a good extension.
We are the music makers, we are the dreamers of dreams...
|
|
|