changing draw order per tick

0 favourites
  • 5 posts
From the Asset Store
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • Hey guys

    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.

    Cheers

    imgur.com/HnPJ8rX

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • Yep, that's what I was thinking of.

    Thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)