[QUOTE=Pakost] OMG @Yann thats a brilliant idea you got!
You are right the towers dont shade each other correctly but i got a solution. Here
Instead of getting all masks on top of the shadow layer i let them along with the shadows to arrange in the layer the same way as the main layer stuff.So now when the object is infront of another, the mask of the front object is over the shadow of the object in the back so it doesnt shades.
That works as a charm. There is one major problem though.... That way i got all the objects in the game multiplied by 3, as object count and as sprites. Even more i got them all ordering by Y (not sure if this affects the performance).
Btw is there a way to make the mask out of the object sprite in construct2, so i dont have to double the sprites in game?
Anyways for my project i think i'll stick with the simpliest way. Have all sprites along with shadows and live with the overlapping glitch. Sadly but i think that technique will get too much for the performance.
As I said, you can use and event system to sort the Z index, and throw your Z ordering plugin away. Using events you'll simple sort them, without any necessity of any other configuration than the placement of the "Imagepoint 0" on the bottom of the sprite.
Double a sprite on the canvas is surely an issue, especially on mobile devices.
Also, this sample have a nice workaround too, and sort Z as mentioned.