how to use the new action sort Z order

Get help using Construct 2

Post » Fri Aug 19, 2016 4:00 pm

how is it used?

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

It is possible with this new action?

Image
Image
B
59
S
21
G
9
Posts: 29
Reputation: 8,967

Post » Sun Aug 21, 2016 5:52 am

Hey Isaske, :)

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)
B
27
S
18
G
8
Posts: 331
Reputation: 6,164

Post » Wed Aug 24, 2016 2:44 am

I did not know that was updated

Thank you!
Image
B
59
S
21
G
9
Posts: 29
Reputation: 8,967


Return to How do I....?

Who is online

Users browsing this forum: AnD4D and 25 guests