Not sure what to call this

Get help using Construct 2

Post » Sat Aug 25, 2012 4:07 pm

Hi everyone,

Back again and stumped hoping you can help. I've got a map with some buildings, trees and a farmer.All the tiles are single tiles. Is there someway to make it so that when the farmer passes behind on of the sprites, he visibly passes behind it? I know I can split the buildings and trees into two and place them on separate layers to achieve this but I really want to avoid doing this for convenience. I've tried on overlap to send the sprites to the top and bottom of the layer and it works but only the second time I pass behind the tree/building. Is there a quick and easy way to do this besides splitting up the images? Yes it's an iso map if you're wondering which turns out is a pain in the bum to make. Anyways any help would be greatly appreciated.


We are here for you!
Posts: 716
Reputation: 17,092

Post » Sat Aug 25, 2012 7:11 pm

It's referred to as "depth sorting" or "z ordering".

A common way to do it would be to put all the object you want to sort into a family and use this event to sort:
System: for each family1 ordered by family1.y
--- family1: send to top

It works best if the object hotspots are on the bottom. You can also do it without families by using one object and having different animation frames represent the different objects.
Posts: 5,494
Reputation: 81,676

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests