obscure the background layers?

Get help using Construct 2

Post » Thu Jul 25, 2013 10:00 am

Hi, the game has a countdown on a top layer, e.g. 3..2..1 go.

The countdown is just some text.

I would like to Obscure the layers underneath during the countdown, to show they are not active, and to emphasize the countdown timer which is hard to read on top of the game graphics.

Is there a way to do this? I have tried some blend modes, and played with layer blend transparency and opacity. Actually, blend modes are webGL, so cant use those as this is for mobile devices.

If I set the layer transparency to NO, and opacity to say 50, it half does what I want, but unfortunately also makes the countdown text 50% transparent.

I really don't want to have to modify the layers underneath - this would produce total spaghetti code.

Any ideas appreciated.nutmix2013-07-25 10:08:25
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Thu Jul 25, 2013 10:08 am

I would probably make a small gray 70% transparent sprite and stretch it to cover the whole scene, but put in Z-order under the counter so it shows clear.
B
240
S
62
G
33
Posts: 903
Reputation: 40,589

Post » Thu Jul 25, 2013 10:13 am

One of the numerous ways to do this is create a tiled sprite which only has to be 1 pixel if you want and stretch it over the layer zet it's z-order to bottom of layer and set it's opacity to 50 during countdown. destroy after countdown.

You could also create a layer underneath the top layer to use for opacity.

I don't know how two extra events would cause spaghetti code.
You could put these events in a group which is only active when you need it to be.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jul 25, 2013 10:14 am

Ninja'd by @Paradox.. :'(
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jul 25, 2013 10:48 am

@LittleStain, You were more thorough though.

The Tiled sprite might be a little less overhead, but it made me think with the sprite, you could put a dark line around the edge, and when stretched it would make a vignette like an old photograph.
B
240
S
62
G
33
Posts: 903
Reputation: 40,589

Post » Thu Jul 25, 2013 11:50 am

Great help, thanks Chaps!
Interestingly, if I set the between layer backgroud colour to black, transparent to No, opacity to 50%, I dont need a sprite! Then when the countdown has finished, I make that layer invisible. nutmix2013-07-25 11:52:19
B
17
S
6
G
3
Posts: 370
Reputation: 3,942


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests