Posted By
|
Message
|
 NMasutaa
Registered 26/12/2004
Points 301
|
11th January, 2009 at 18:26:55 -
In a game with a top-down perspective, how can you make it so that objects with greater Y positions appear in front while those with lower Y positions appear in back? (i.e. Since the objects are constantly moving, their Y positions are constantly changing. How can you make it so that one object is in front at one moment and in the back at another?)
n/a
|
 Knockturnal Nothing to see here turn back
Registered 11/04/2008
Points 354
|
11th January, 2009 at 18:34:53 -
Make collision markers (invisible walls) and add these two events:
+Y of ("Player") is lower or equal Y of ("Whatever")
-Order ("Player") to back
+Y of ("Player") is greater Y of ("Whatever")
-Order ("Player") to front
That should solve it
Professional vaporware developer
|
 Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
      
|
11th January, 2009 at 18:50:41 -
I think the Layer object has this as a simple function, built in. Otherwise you could create a list of objects, use a sort algorithm to put it in Y order, and then put them in front in that order. Somewhat complicated
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
 Deleted User
|
11th January, 2009 at 18:52:17 -
If you have the layers extention, you just need to set to Always and it's got an automatic command I believe, but that takes care of most of it. If you need objects in a specific place, you can position them in the same command using the bring to front or back, ect.
|
 Rox Flame Creative Talentician
Registered 06/10/2004
Points 383
|
11th January, 2009 at 22:57:28 -
Indeed, layers extention handles this well. You can also arrange via alterable values etc. I have used this extention for that very purpose a few times.
Current project:
Dynabrick (%70)
|
 Deleted User
|
11th January, 2009 at 23:20:41 -
Holy crap, I didn't even notice you posted before me pixeltheif. Are you batman?
|
 MBK
Registered 07/06/2007
Points 1578
|
13th January, 2009 at 07:06:55 -
Hey jneumann1, Pixelthief isn't Batman .... he might be Batman's SuperComputer though ... some of the things he's made with math is so complex and astonishing, it amazes me.
I use the Y axis method that Black Jaguar mentioned, simply because I know of no better way.
Click Me! http://www.create-games.com/project.asp?view=main&id=1444
http://www.mediafire.com/download.php?aoo1dnnlq5i
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
|
 Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
      
|
13th January, 2009 at 07:44:19 -
$error Line 42:273 0xFFFFFFF7 Human Suspicion Aroused $$$sudo execute §▓▓▓╞╦═╧╦╥╫■ [Human Life Form Termination Cycle] EXTERMINATE!! EXTERMINATE!!! /n
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
 -J-
Registered 05/10/2008
Points 228

|
13th January, 2009 at 10:16:18 -
Lol!
So Batman was working with the Daleks all along °_°
n/a ...
|
|
|