[Solved] Z order and container

For questions about using Classic.

Post » Thu Apr 22, 2010 2:48 pm

Hi everyone !
My question is pretty simple :
How can I preserve the Z order of my sprites (exemple:"windows, door, etc...") which are contained in an other sprite ("home") when I spawn the sprite "home".

Exemple image :
Original :



When spawned :


Thanks in advance !
B
2
G
3
Posts: 15
Reputation: 1,207

Post » Thu Apr 22, 2010 3:23 pm

There is no z index, only z order, and z height.
Currently z order is set to the order in which it was created in the editor. To change the z order in the editor simply right click the object and use the context to set its order, or Cntrl-arrow I believe.
Now this z order may not be preserved if the object is destroyed during, or at run time, so to set it correctly simply change its z in the same condition that is created. In this case.

system create object window
->window place in front of house.

This will move just the window that was just created, since it was placed into the S.O.L.

Also you might check the Construct wiki for "container"... it means something a little different here.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Thu Apr 22, 2010 3:41 pm

It works, thank you very much :)
(by the way, I edit me post title (with Z Order))
B
2
G
3
Posts: 15
Reputation: 1,207


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests