obscure the background layers?

0 favourites
  • 6 posts
From the Asset Store
100+ sprites for spooky / creepy game. Ideal for Platformer & Metroidvania games or Halloween.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • Ninja'd by :'(

  • LittleStain, You were more thorough though. <img src="smileys/smiley2.gif" border="0" align="middle" />

    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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)