How do I Make Parts of an Object Invisible.

Get help using Construct 2

Post » Sun Dec 21, 2014 2:45 am

Hello everyone, this is my first post here and I hope I explain everything correctly. I am very new to all of this and spent a good amount of time trying to get this effect to work but came up short handed. I was also probably using wrong key words to search in Google when trying to resolve my issue. Below is a quick example gif of what I am trying to achieve along with an explanation below it.

Image

I am trying to make it so only the the area in the magnifying glass make the box "invisible". I was able to make it so when the magnifying class touches/overlaps/ect... it makes the entire box invisible, however I am just trying to achieve this effect inside the magnifying glass area. I'm not sure if Construct 2 is able to do this or not. Also there will also be an "inside the box texture" (instead of it just being transparent/white) this was just a quick mockup.

I hope I explained as much as I can, thanks for taking the time to read this.
B
3
Posts: 3
Reputation: 181

Post » Sun Dec 21, 2014 3:52 am

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Dec 21, 2014 3:56 am

Wow, exactly what I needed, thank you!
B
3
Posts: 3
Reputation: 181

Post » Sun Dec 21, 2014 3:58 am

First, I've made an example and then I'll explain it.

revealingGlass.capx

For this trick you need two layers, the "inside" layer and the "outside" layer, where your inside and outside objects go respectively. Your magnifying glass sprite will also go on the "outside" layer. On the "outside" layer you'll have a mask object -- placed above the outside box image, but below the magnifying glass image -- that has its blend mode set to "Destination out", which in a basic sense blends out everything below it on its own layer. For the blend mode to work correctly, the "outside" layer needs "Force own texture" set to true in the layer properties.

Let me know if you you have any questions.

EDIT: Looks like I spent too long writing this post, but here it is anyway.
You do not have the required permissions to view the files attached to this post.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,126

Post » Sun Dec 21, 2014 4:11 am

It's all good thanks for writing that out and giving me an example as well to mess around with, very much appreciated!
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests

cron