Dynamic alpha mask

Get help using Construct 2

Post » Sun Feb 05, 2012 11:01 am

Hi all!!

I'd like to know if there were a way to make a dynamic alpha mask, like a sniper scope or something...

But actually, I'd like to make something like a sniper scope, but "reverted" : everything would be invisible but the objets within the scope would be revealed.

Is this possible? If so, how could I do that?

Thanks in advance!

Rag'
B
17
S
4
G
4
Posts: 137
Reputation: 3,767

Post » Sun Feb 05, 2012 11:19 am

Example using sprite effects.
Notice I'm using two layers, the top layers with the scope effect is to have its property "Force own texture" set to yes.
The objects "Cover" and "Scope" both have an effect allowing for the effect to work.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sun Feb 05, 2012 12:56 pm

Interesting!

With that kind of method, is it possible to have a sprite "invisible" by default and reveal it by moving the scope over it?
B
17
S
4
G
4
Posts: 137
Reputation: 3,767

Post » Sun Feb 05, 2012 2:47 pm

You can make a layer visible or invisible by event (:
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Feb 05, 2012 3:09 pm

"invisible" was not the right word, sorry I meant something like... "masked".

For example: I have a sprite, I want it to be "masked" by default (for the player, it would just be invisible) and smoothly unmasked when I put a scope over it, just like the example above but "reverted".

In a game, it could be, I don't know... Maybe some "invisible" ghosts the player would have to reveal with a magical light.

Know what I mean? I think my description is not clear enough...
B
17
S
4
G
4
Posts: 137
Reputation: 3,767

Post » Sun Feb 05, 2012 4:25 pm

revealGhost.capx

need the canvas plugin
Last edited by Yann on Sun Sep 14, 2014 9:44 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Feb 07, 2012 2:18 pm

You're the men, guys :)

I'll have a look at this! And eventually get back if I'm lost...
B
17
S
4
G
4
Posts: 137
Reputation: 3,767

Post » Mon Mar 11, 2013 10:19 pm

Not sure if this is along the same lines - but I couldn't get these examples to work...

Let's say I have a background city wall
A person layer with skin
Underneath that person muscle and bone.


Is it possible to dynamically apply mask sprites at different locations of the skin layer to reveal the muscle and bone?

Thanks
B
13
S
1
Posts: 17
Reputation: 946


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests