[Resolved]Create a 'window' that hovers above game

Get help using Construct 2

Post » Sun Feb 10, 2013 10:01 am

I want to create a box that essentially only shows everything within the area of that box, so I can have it hover above the gameplay area, but outside of the box the sprites don't show.

I plan on using this for tutorials, but without something similar to a "layer mask", I don't know where to begin.Thndr2013-02-11 18:55:47
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Mon Feb 11, 2013 7:59 am

Okay, found a function called Blend Mode for layers and sprites, but I'm unsure if it's possible to do this.

For the tutorial I want to have 3 seperate boxes, and each box uses ingame assets that should only appear in it's chosen box and shouldn't leave the borders (like a layer mask)

However blend mode seems to leave everything black below or outside it, not transparent to the other layers.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Mon Feb 11, 2013 8:15 am

Are you looking for something like flashlight effect?

Flashlight example

It's sprite with 'destination out' set as blend mode, the layer is non transparent with black fill.
B
24
S
8
G
7
Posts: 756
Reputation: 7,242

Post » Mon Feb 11, 2013 9:38 am

Sort of.

Basically I created a rough outline here: http://dl.dropbox.com/u/73774002/mask_test.capx

There are three boxes with outlines. Red boxes should only appear in the first box, blue in the second, and green in the third. All three outline boxes need to be visible.

Basically a layer mask around each 'box'.

With force texture and destination in I can get it how I want it, but force texture also blurs any scaled sprite even when I have point-scaling enabled. Surely there's a simpler way to mask what I want effecientlyThndr2013-02-11 17:07:12
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Mon Feb 11, 2013 6:55 pm

Okay, I think I have it. Basically I'm surrounding what I want with the Destination Out mask sprite, then with WebGL Turned on and point sampling forcing texture.

This way nothing gets blurred and it seems to work fine.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891


Return to How do I....?

Who is online

Users browsing this forum: bikachu, Exabot [Bot], LukeNecklace, SoldjahBoy and 12 guests