Z Order Bar

The Z Order Bar allows precise control over which objects appear in front of others. Although Construct 2 is a 2D engine, the term Z order is used to refer to the display order of each individual object.

The Z Order Bar is not available in the Free edition of Construct 2.

The Z Order Bar
To open the Z Order Bar, either right click in the layout view and select Z order -> Edit Z order..., or tick the Z Order Bar checkbox in the View tab of the ribbon.

The Z Order list

If no objects are selected, the Z Order Bar displays all objects in the layout. Group markers appear identifying each layer from the Layers Bar. The Z Order increases upwards in the list, meaning objects at the bottom of the list are displayed at the back, and objects at the top of the list are displayed at the front.

If any objects are selected from the Layout View, the list is filtered down to only those objects and any other objects overlapping them. The objects selected from the Layout View are also shown in bold. This makes it convenient to see the relative Z order of a small area without having to take in to account the rest of the layout.

Identifying instances

With lots of the same instances in the list, it can sometimes be difficult to tell precisely where a particular instance occurs in the list. To help identify each instance its UID appears after its name, e.g. Player 41 (meaning a Player instance with UID 41).

Instances in the list which were selected in the Layout View are also highlighted in bold. Selecting instances from the Z Order Bar itself will also select objects in the Layout View and show their properties, but will not affect the filtering of the list.

Sprite objects which have a different initial image set by changing the Initial frame or Initial animation properties also display an icon for that initial image in the Z Order list.

Finally, instances can be double-clicked to make them flash briefly in the Layout View. Alternatively an instance can be right-clicked and then Flash instance selected. This helps visually identify the instance in the layout.

Editing the Z Order

Using the Z Order bar is very simple: to move an object in the Z Order, simply drag and drop it in the list. You can also move objects to other layers this way. You can also select multiple objects by holding Control or Shift and drag them all as a block to another layer or location in the Z Order. When doing this, the relative order of the selection is also preserved.

If you want to add, remove or reorder layers themselves, use the Layers Bar instead.

View options

You can right-click the Z Order Bar and select Show active layer only. This further filters down the list to only display objects on the current active layer (the selected layer in the Layers Bar), which can be useful when working with a single layer.

Tags: