how to use the new action sort Z order

  • how is it used?

    I want to manage the z-order of the sprites to my taste

    It is possible with this new action?

  • Hey Isaske, <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Yes "Sort Z order" is probably what you want. There are other ways to Z order objects, but this new action is the fastest.

    The online C2 manual has a pretty good overview, which I included below, along with a link to the page.

    Sort Z order:

    "Sort the Z order of instances of a given object according to an instance variable. This effectively removes all instances from their Z order, sorts them, then inserts the sorted sequence back in to the holes left behind.

    This means if the instances are spread across a range of layers, they will be sorted in the same Z order locations, maintaining the same order relative to other instances on those layers.

    Note this action is much faster than using an ordered For each with an action like Send to front/back, so this action should be the preferred way to sort the Z order of large numbers of instances."

    (source: https://www.scirra.com/manual/125/system-actions)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did not know that was updated

    Thank you!

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