Using alpha of one layer to mask another layer

Get help using Construct 2

Post » Thu Jan 23, 2014 12:55 pm

Using alpha of one layer to mask another layer...

Is this possible?

I want to make a dust particle effect inside of a lightbeam, so that the dust is only visible within the light beam.

(Light beam(s) on Top layer, dust covering complete bottom layer)

But I also have Layers with content below and I don't want those to be affected. So i can't use the "destination out" blend mode.

Any Ideas?AndyKayJah2014-01-23 13:00:34
B
6
S
2
G
2
Posts: 31
Reputation: 1,293

Post » Thu Jan 23, 2014 12:59 pm

You can use destination out but you should use the force own texture for the layer.

Made this one not too long ago for someone elseLittleStain2014-01-23 13:04:00
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jan 23, 2014 1:14 pm

OK this one helped me...(Thanks a lot so far) so I have to do it on the same layer.

Still have one problem:

The masking of my Lightbeam now works, but only inside the boundaries of the image itself. This would mean to accoplish my desired effect I would need a huge Transparent area in my Image that covers the whole layout, which would waste a lot of memory.

Any Ideas on that as well?
B
6
S
2
G
2
Posts: 31
Reputation: 1,293

Post » Thu Jan 23, 2014 1:34 pm

you'd only have to mask the viewport, not the entire layout.
If you use one or more instances (depending on how you've set things up) of a transparant tiledbackground of 2x2 for that it should work.

I'm not even sure all has to be covered if you set things up properly, but if you have to?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jan 23, 2014 2:38 pm

yeah you're right, the tiled background would do the trick, I didn't think of the possibility to use more than one object for masking my dust.

Thanks a lot
B
6
S
2
G
2
Posts: 31
Reputation: 1,293

Post » Fri Jan 24, 2014 9:48 am

Thanks again for your Help, you can see the Result here if you want:

www.againstgravity.de (choose Testlevel)

Controls:
When hitting LMB the ship will rotate towards the Mouse Cursor and give thrust relative to the distance ship/cursor.
It's best to place the cursor over the ship, press and hold LMB and then move the mouse up slowly to get a feeling for the controls.

While LMB is pressed you can throw bombs with RMB.

While LMB is released you can shoot lasers towards the cursor.

What do you think?AndyKayJah2014-01-24 09:50:09
B
6
S
2
G
2
Posts: 31
Reputation: 1,293

Post » Fri Jan 24, 2014 10:02 am

Wow! Looks gorgeous.
B
7
S
1
Posts: 74
Reputation: 1,232

Post » Fri Jan 24, 2014 10:37 am

That is very good.
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
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Fri Jan 24, 2014 10:54 am

Looking gorgeous, glad I could help!
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jan 26, 2014 5:25 pm

Really great-looking game! Definitely one of the higher quality C2 games I've seen!
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests