The Daily Click ::. Forums ::. Klik Coding Help ::. Layers not rendering in correct order?
 

Post Reply  Post Oekaki 
 

Posted By Message

cake



Registered
  13/12/2002
Points
  1173
19th November, 2009 at 10:40:55 -

Gentlemen.

I've got a level editor that has a bunch of layers that you can place objects in, and it all works fine. But then I scroll away and scroll back and layer 2 draws over all the other layers except for layer 7 (the very top layer). It SHOULD be drawing underneath every layer except layer 1 (in other words drawing in the order of whatever number it is).

Anyone encountered this before?

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
19th November, 2009 at 13:11:04 -

That's a bit messed up. Are you using the Layer Object to hide/show any layers? Or maybe different actives are spawning on the wrong layer?

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

cake



Registered
  13/12/2002
Points
  1173
19th November, 2009 at 15:11:08 -

No, no layer object. I'm not even really touching the layers at all, just placing objects on them.

I made sure to check the exact layer each object is on at run time, and I could find no pattern except for its consistently layer 2 that is being screwy.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
19th November, 2009 at 18:50:47 -

ignore layer 2 then?

1 3 4 5 etc?

 
n/a

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
19th November, 2009 at 21:00:07 -

Since you mentioned it, I think that I possibly have had something screwy happen on layer 2 for me, but that might just be a coincidence. I think all I did was continue to stuff around with events like 'bring to front' or 'move to layer' and 'move in front of object'.

 
n/a

cake



Registered
  13/12/2002
Points
  1173
23rd November, 2009 at 13:39:01 -

Okay, after closer inspection it's not just layer 2. If I move everything on layer 2 'to back', then layer 3 just starts doing it.

I worked out a very good solution, but it requires sorting lists. I need a data structure that is capable of stable sorts (http://en.wikipedia.org/wiki/Sorting_algorithm#Stability ) (MagicDeque and Dynamic Array are both unstable) on 2-dimensional arrays. Does anyone know if one exists?

Thanks!

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
23rd November, 2009 at 15:08:29 -

You should not have to do a shoddy work around, Report this on the clickteam forums.

http://www.clickteam.com

Edited by UrbanMonk

 
n/a
   

Post Reply



 



Advertisement

Worth A Click