How do I "mask" the bottom layer/object?

Get help using Construct 2

Post » Fri Apr 10, 2015 6:00 pm

I know this question being asked a lot of times, yet I couldn't find a way for my solution.

The black box is the mask(name "Oil Masking"), and the layer below is the full oil inside the bottle("Oil on Bottle").
I want to show the remainig oil inside the bottle, minus the black box & the "block-outed" oil, so it will look like the oil is not totally full.

Image

I tried many blending type but it just won't work. (I'm not totally understand this part) I just can't figure out how to solve this problem...

Help is so much appreciated.
Image Image
B
48
S
23
G
8
Posts: 166
Reputation: 7,854

Post » Fri Apr 10, 2015 7:02 pm

The example blend modes from Construct 2 contains a visualization of the blend modes. So what you wanna do is put the black oil mask on the same layer als oil in bottle, put the oil mask above the oil (z-order) and set the mask's blend mode to destination out (if I'm not mistaken)
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Fri Apr 10, 2015 7:03 pm

Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Fri Apr 10, 2015 11:26 pm

use blend modes on those sprites - out and in should do the work
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
39
S
14
G
12
Posts: 617
Reputation: 9,297

Post » Sat Apr 11, 2015 2:07 am

Guys, thanks to your direction, I've finally figured this out!

@mindfaQ: Thank you for your tips about putting the 2 objects in same layer. It's 'Source in' on the mask's blending, I have to put the mask's opacity to 0 first to work. ('Destination in' also works the same.)

And 'Source out' & 'Destination out' work in the inverted way.

Thanks!! :D
Image Image
B
48
S
23
G
8
Posts: 166
Reputation: 7,854


Return to How do I....?

Who is online

Users browsing this forum: Darknessed, DolyGamesCosmos, ismael123 and 8 guests