Layer Effects?

Get help using Construct 2

Post » Wed Nov 23, 2011 4:49 am

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.
Any thoughts?
B
1
G
1
Posts: 3
Reputation: 456

Post » Wed Nov 23, 2011 7:08 am

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
          if (render_offscreen)
          {
               // 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.
B
1
G
1
Posts: 3
Reputation: 456

Post » Wed Nov 23, 2011 3:33 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Nov 25, 2011 12:22 pm

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?
B
1
G
1
Posts: 3
Reputation: 456

Post » Fri Nov 25, 2011 4:41 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, Lancifer and 28 guests