hey jcstranger, thats a good question ,
I dont know if there is a better way but ...I would consider keeping in mind the process order of your event sheets.
Event sheets process commands from top to bottom so basically if you combined this knowledge with turning on and off groups of events you should be able to come up with a solution.
Or another possibly easier way would be to use Instance Variables, in this case I would use Booleans
1st ....-Put all of your Collision checked objects into a Family and then assign a Boolean Instance Variable to the Family
Name it something like "Collision_Enabled"
Then if you put all of your Collision check Events in a Group on your Event Sheet, you could direct the Z-index equal Collision objects to The Collision Actions in the next Event because Event Sheets process from top to bottom
The Construct 2 manual entries on Z order are
-LayerName
The name of the layer the instance is currently on.
-LayerNumber
The zero-based index of the layer the instance is currently on.
-ZIndex
Gets the zero-based index of the Z order of this instance within its current layer. 0 is the bottom instance, increasing up to the top instance.
So..The next step would be to would create 2 Groups of events one controlling the other...You might be able to make this a sub event but it may work better as a separate event...Trial and error will tell which works best
Group 1 The Z- index Check
Create the following event and place it within its own Named Group
for example : "Z-index Check Group"
This 1st Group event only compares the Z-index of each object and triggers the Boolean Instance Variable per Object BUT only if they are actually colliding..
This way you save on alot of processor work ..otherwise you will be clogging up the system with unnecessary checks per tick.
Z-index Check Group Conditions
-->Object or Family 1--> on Collision with Object or Family 2
--> System ->Compare 2 Variables-> Object 1 Zindex = Object 2 Zindex
Actions
--> System->Turn on Group "Collision Actions"[/code:2o8ncrox]
Next... Event Group 2
Actual Collision Actions
Create another Event and place it within its own Named Group
For example : "Collision Actions"
This Group handles the actual Events that happen if the Z-Index proves equal per object but only if its turned on by the first event group ie only if the Objects Boolean Variable is Triggered TRUE by the first z-index check Group
Collision Actions Group Conditions
[code:2o8ncrox]-->System-> For each Object
-->Object->Is Boolean Instance Instance Set ("Collision_Enabled")
Actions
--> Here is where you would place any actions that are related to the triggered Collisions[/code:2o8ncrox]
------------------------------------------
This should be all that is required..I know it sounds complex but if you follow the steps it should work
providing I didnt miss or forget anything
Hope that Helps