Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_zSorter

Plugin, ACE table, Discussion thread
Dependence: None

Introduction
Sort the z index of all instances in a specific layer.

Usage
Sort by position Y
Sample capx
Call "Action:Sort all Objects in layer by Y" to sort z index of all instances in the specific layer. If position Y is equal, this plugin will sorting by position X increasing, or decreasing set at "X order" in properties table.
Sort by custom function
Sample capx
This plugin also support sorting by custom function
  1. Call "Action:Sort by function"
  2. It will trigger "Condition:On sorting" for each two compared instances pair, use "Expression:CmpUIDA", "Expression:CmpUIDB" to get these instances.
  3. Then call "Action:Set compared result", or "Action:Set compared result by number" to return compared result of these two instances.
图片

Move to object at Z index
Sample capx
Call "
Action:Move to object" and assign two instances with their UID to move the Z index of first instance in front, or behind second instance.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About