Sprites to show black until light hits them?

Get help using Construct 2

Post » Mon Mar 03, 2014 7:51 am

Okay, so here's what I'd like - For all my sprites to show as black silhouettes, until they interact with a light mask.

So I have a sprite representing the light, when that is over another sprite, the sprite shows it's colours normally. When it is not over the sprite, the sprite is a black silhouette.

It's a lightmask, basically.

I've been playing about with blending for a few hours now and I can't seem to find what I'm looking for. I thought I found it for a moment and then... lost it?

Wonder if anyone else has found anything like this?
B
5
S
1
Posts: 85
Reputation: 545

Post » Mon Mar 03, 2014 8:43 am

I think I would do this just with animation frames - frame 0 the shadow version, frame 1 the coloured version, then do something like

overlapping light sprite then set frame to 1 else set frame to 0

edit - I can't check at the moment but I think that one of the FX that come with c2 can do this...(make black and white)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Mon Mar 03, 2014 1:04 pm

Could this work CAPX
Just set opacity to 100 for layer 2.

Small note, for some reason it doesn't work on node-webkit. At least for me.
B
34
S
9
G
3
Posts: 517
Reputation: 5,276

Post » Mon Mar 03, 2014 2:52 pm

a quick test using built in fx.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Tue Mar 11, 2014 2:25 pm

Do you want something like this
You do not have the required permissions to view the files attached to this post.
B
257
S
42
G
15
Posts: 1,991
Reputation: 41,411

Post » Fri Apr 04, 2014 1:17 pm

just wanna say thanks to @katala here, i'd gave up on this long ago, I'd never thought about having the backdrop on a layer *above* the lighting and using a blend mode. cheers
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Apr 04, 2014 7:32 pm

@keepee, Your welcome :) Just a shame it doesn't work on Webkit.
B
34
S
9
G
3
Posts: 517
Reputation: 5,276

Post » Fri Apr 04, 2014 9:43 pm

@Katala, it's working fine for me
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Sat Apr 05, 2014 7:29 am

@keepee I get this.
Image

Could it be from GPU blacklist? I have GeForce GTX 560 Ti TOP. Though I don't get any forced canvas2d rendering.

Edit: Works on Fullscreen quality set low.
B
34
S
9
G
3
Posts: 517
Reputation: 5,276


Return to How do I....?

Who is online

Users browsing this forum: John Cutter and 6 guests