I'm trying to come up with a simple method to handle draw order in an isometric/skewed top-down project as I've never tried this in C2 (done it in GMS and GM2).
I kind of have it working, but it's not playing nicely, working on only a single instance. So I'm thinking, is there a simple way to test this against individual instances? I was hoping there would be a command like instance.tree.y that would take each one and test them separately, but I can't get it to work.
I've looked for documentation online and there's nothing really for how to do this in C2/3 that I could find.
Anyway, a push in the right direction would be good.
Move to top/Move to bottom actions are slow, it's not recommended to use them on every tick.
Use "System -> Sort Z Order" instead. If you have multiple objects, add them to a family, create an instance variable and use it for sorting.
yep, that works well, thanks dop2000.
Wondering if I should have a separate family for static objects that can just compile z order on created in one go, rather than having a line for each object type which could get messy, then sort them in the draw order family?
You can replace events 2 and 3 with just one event:
DrawOrder on created -> DrawOrder set currentY to self.Y
Develop games in your browser. Powerful, performant & highly capable.
Yep, that's what I was thinking of.