So I'm now pretty confused. I also have no idea where the depth sorting even is in the Eclipse objects. Nor do I fully understand how to set a light's depth or how I'd incorporate instance depths into it or how to incorporate light depths into my own depth sorter above. I don't mind using a different method but I don't know how to incorporate light depth (or set light depths) into a depth sorter in general.
I've reverted back to setting the depth for my objects as per your suggestion.
Controller create event (setting layer depths):
layer_depth("Instances", -1);
layer_depth("Light_Layer", 0); // <-- light_engine object placed on this layer
layer_depth("Background", 1);
Player create event:
light = instance_create(x, y, le_light_spot);
Player/Solid Objects step event:
depth = room_height - y; // this works, my player is going under and over other objects properly and vice versa
As well in my Player step event for their light:
light.x = x; light.y = y+1; // so the light always goes over my player
light.depth = y / room_height;
light.light_depth = light.depth;
Expected Results:
If the player goes above the building (y < building.y), the player should be drawn underneath it. The player's light should be drawn over the player, but underneath the building.
If the player goes below the building (y > building.y) the player should be drawn overtop of it. The player's light should should be drawn over the player as well as the building
Results:
Positives: The lighting system successfully goes over my background and instances layers (I will refer to this as the "darkness")
Negatives: My player's light is always under my player/all other instances but above the background. Setting the Light_Layer depth to -2 puts it over everything. Setting light.depth or light.light_depth doesn't appear to change anything. It doesn't matter where my light's y is set to, it will get drawn over all instances at all times, even if my player goes under (y < building.y) a building.
What am I doing wrong?