How do I make the entire screen fade to black?

Get help using Construct 2

Post » Tue Nov 17, 2015 4:28 pm

^^^^
B
5
S
1
Posts: 73
Reputation: 521

Post » Tue Nov 17, 2015 4:37 pm

One way to do it is to use a non-transparent layer with a black background, and lerp its opacity from 0 to 100 using a lerp factor of your choice.
B
67
S
28
G
24
Posts: 970
Reputation: 18,675

Post » Tue Nov 17, 2015 5:06 pm

If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Tue Nov 17, 2015 5:10 pm



+1 for this. I LOVE this plugin. Did exactly what I wanted it to do. No issues on nw.js export either.
B
41
S
11
G
1
Posts: 260
Reputation: 3,266

Post » Tue Nov 17, 2015 5:29 pm

Instead of lerping, I just added a fade behaviour to my black overlay sprite and triggered the behaviour when my layout ended.
B
7
Posts: 12
Reputation: 329

Post » Tue Nov 17, 2015 5:44 pm

Magistross wrote:One way to do it is to use a non-transparent layer with a black background, and lerp its opacity from 0 to 100 using a lerp factor of your choice.


Could you elaborate on that?
B
5
S
1
Posts: 73
Reputation: 521

Post » Tue Nov 17, 2015 6:46 pm

First, create a new layer and place it at the top-most level. You can also rename it to something like "Fade". In its properties, locate the "Transparent" one, and set it to "No". Next, set the "Background color" property to black (or any other color you wish the fade to be), and finally, set the "Opacity" property to 0.

The actual fading can be done in a number of way, but the easiest one is to lerp from 0 to 100 using an incrementing lerp factor. Like this :
Image
The "Start of layout" can be replaced by any trigger you want.
B
67
S
28
G
24
Posts: 970
Reputation: 18,675


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests