Layer-specific flashlight effect

Get help using Construct 2

Post » Thu Jan 03, 2013 2:07 pm

Hi all,

I'm trying to make a (flash)light effect for a platform game. I've used the method used in the example file, by creating white circles on a black layer with blending mode set to 'Destination out'.




Now I'd like to exclude the background layer from this effect, the following image shows what I mean.




Is this achievable through blend modes? Could I somehow set a layer to mask the underlying layer like in Photoshop?


Here's the .capx, but it's not that different from the example file.
https://www.dropbox.com/s/wagtcfct4yrk7wo/Lighting.capxXypo2013-01-03 19:22:29
B
3
Posts: 6
Reputation: 287

Post » Thu Jan 03, 2013 6:27 pm

I've done it differently now.

I'm using a big image that follows the player.
It's a black rectangle with a transparent center. Blend mode set to 'Source atop' with the layer set to 'Force own texture'.

Not sure if this is the best way to do it, but I thought I'd upload the .capx for others that might find it useful.
https://dl.dropbox.com/s/8vxnru7ugaq1mwc/FlashLight.capxXypo2013-01-03 19:23:34
B
3
Posts: 6
Reputation: 287

Post » Sat Jun 08, 2013 1:18 pm

I think this is discussed here, and a suggestion was made to make it more photoshop like, the handling of effects clipping masks etc.

http://www.scirra.com/forum/apply-effect-to-only-certain-objects_topic56305_page1.html
B
32
S
4
G
1
Posts: 264
Reputation: 2,422


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, mnashwan, shinkan, stylie1, tarek2 and 13 guests