Z order confusions

For questions about using Classic.

Post » Mon Sep 27, 2010 1:37 am

Hi everyone!

I'm making a game and it's been smooth sailing so far, but I've run into my first problem. Z order.
The player should go behind the trees when he is above them, and in front when he is below them. This only happens for some trees, the rest just don't work properly.

Here's my .cap: [url:1bu3icvp]http://dl.dropbox.com/u/7129504/Rpg.cap[/url:1bu3icvp]

The code for the z order is at the bottom of the events list. Am I doing it wrong? Is there a simpler way of doing this?
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Mon Sep 27, 2010 2:13 am

Use the is overlapping condition with your events to select the correct tree to place behind/in front of.

Repeat that for all 3 trees.

Or you could add all three trees to a family, say "Terrain", and change the tree references in those three events to Terrain. That way all the trees will be handled in just three events. It also makes it simpler to add other visual blocks such as signs, rocks, etc... without the need for extra events to do the sorting.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Mon Sep 27, 2010 3:16 am

Ah ok, I get it. Just one question, how do I find the Y coordinate of a family? I've added all 3 trees to the Terrain family, but I can't seem to find it in the event editor.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Mon Sep 27, 2010 3:39 am

When inputting an expression
Double-click on any object.
Click back.
You should now see a list of all the families in addition to objects.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Mon Sep 27, 2010 6:05 am

Thanks R0J0hound, you've been a great help :)

I'll update this thread if I run into any more z order problems.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest