I see when I change a layer to "Force own Texture" that there should be an option to set effects for a layer. But I've looked all over and cannot find them. I'm trying to create an effect similar to the lighting demo on Scirra Arcade but can currently only use 1 'light' at a time.
So answered my own question. Layers cannot currently have effects
For Reference here is the offending code.
// If rendered to texture, paste to main display now
// Drawing at layer opacity
ctx.globalAlpha = this.opacity;
ctx.drawImage(layer_canvas, 0, 0);
// Restore 100% alpha
ctx.globalAlpha = 1.0;
I'm about to install r69 and if I'm still not able to add layer effects I'll add in the code myself and post it here for all.
Develop games in your browser. Powerful, performant & highly capable.
We don't currently support layer effects but it's something we hope to in future. This doesn't mean you can't do lighting - the .capx for the lighting demo is in the examples directory installed with Construct 2, and it has two lights.
Aye, it does indeed. But it falls a bit flat I'm afraid. What I need is to be able to light both the background and foreground separately IE the background needs to show up and the foreground needs lighting. With this system currently that cannot happen. I've seen the code where the change needs to be made unfortunately I cannot modify the layers list of properties as they seem to be on the 'tool' side of things. Seems a small change, any chance of r70 including it?
Can you show me an image of what you mean? I'm not sure what your proposed fix is, and it seems to me you could just make 2 layers from the lighting example and have 2 layers of lighting.