How do I Get a transparent Hole in a players Pic.

Get help using Construct 2

Post » Wed May 18, 2016 3:39 am

Hi,
I have go so far as being able to get a player to pick a picture, now i would like to be able to make a transparent hole in it. any ideas please ?
thank you. :)
B
13
S
4
Posts: 60
Reputation: 1,001

Post » Wed May 18, 2016 3:57 am

you can mask it out with another circle shaped sprite, or use something like the 3rd party canvas plugin to redraw it to a new image (not necessary if you don't actually need the user to download the image)


For masking check out "Blend modes.capx" in your construct2\examples directory.
Image
B
74
S
28
G
12
Posts: 515
Reputation: 12,359

Post » Wed May 18, 2016 5:48 am

Lof wrote:you can mask it out with another circle shaped sprite, or use something like the 3rd party canvas plugin to redraw it to a new image (not necessary if you don't actually need the user to download the image)

Hi Lof, thank for helping :).
For masking check out "Blend modes.capx" in your construct2\examples directory.

I have used a mask over it however this will not let me see through to the layer behind.
ie if the player uploads the target as a tree when hit i want to see through the tree to the forest or what ever behind.
B
13
S
4
Posts: 60
Reputation: 1,001

Post » Wed May 18, 2016 7:00 am

Did you make sure the mask is on the same layer and that the layer has force own texture set to true? Please note that these blend modes do not show in the editor, the effect is only visible in preview.

Also z-order of the mask is very important.

Edit: set opacity to 0 the mask's. Very important!
B
15
S
6
Posts: 85
Reputation: 1,195

Post » Wed May 18, 2016 8:29 am

Put everything you want to be masked out on the same layer, put the mask object on top, turn "Force on texture" ON, put everything else on a layer below it.

here is an example

http://www.headbangames.com/mask.capx
Image
B
74
S
28
G
12
Posts: 515
Reputation: 12,359

Post » Thu May 19, 2016 1:48 pm

Pulstar wrote:Did you make sure the mask is on the same layer and that the layer has force own texture set to true? Please note that these blend modes do not show in the editor, the effect is only visible in preview.

Also z-order of the mask is very important.

Edit: set opacity to 0 the mask's. Very important!

thank you for helping :)
B
13
S
4
Posts: 60
Reputation: 1,001

Post » Thu May 19, 2016 1:48 pm

Lof wrote:Put everything you want to be masked out on the same layer, put the mask object on top, turn "Force on texture" ON, put everything else on a layer below it.

here is an example

http://www.headbangames.com/mask.capx

thank you very much :)
B
13
S
4
Posts: 60
Reputation: 1,001


Return to How do I....?

Who is online

Users browsing this forum: David181, dop2000, namaewayukidesu and 13 guests