Z-Elevation problems (Solved)

For questions about using Classic.

Post » Mon Jan 10, 2011 6:07 am

I have a game where to create a sense of 3D the objects closer to the bottom of the screen are in front of objects higher on the screen. I need the same thing to happen even when I spawn new objects but I can't get it to work. :(

Download
Non-direct download
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Mon Jan 10, 2011 9:49 am

For each object (your tiles) ordered by .y (your tiles) coordinate ascending send to back.

Edit:
Actually, make that send to front, ascending or descending.
[code:3iy9hejc]+ System: For each greenPod ordered by greenPod.Y Descending
-> greenPod: Send to front[/code:3iy9hejc]
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Tue Jan 11, 2011 6:39 am

Thanks, I've used the same system to order my dirt tiles, but now the greenpod goes infront of all the dirttiles :(
Download
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Tue Jan 11, 2011 8:20 am

From the cap Im not exactly sure what you want to happen.
I can tell you there's a difference between z order, and z height.
Z order gives you the order in which objects are drawn to the screen. Z height gives the object an aspect ratio to the camera's view point.
In this case I believe you will want to use the y coordinates rather than the z height.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Jan 12, 2011 2:27 am

I'm trying to make the greenpods go behind the dirttiles.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Wed Jan 12, 2011 3:36 am

Add all isometric objects to family and use "for each..." -event for family, it should works
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Wed Jan 12, 2011 8:34 am

[quote="AfterShock":2d2a2ev6]I'm trying to make the greenpods go behind the dirttiles.[/quote:2d2a2ev6]
Events are run in order, so if you were to place the dirttiles event after the greenpods.....
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Thu Jan 13, 2011 11:39 pm

Thanks guys, putting the sprites all in one family and then making a "For each" statement worked.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests