How do I fade the screen?

Get help using Construct 2

Post » Sat Jan 03, 2015 1:16 pm

Hi,
I'm looking for a smarter way to do a screen-fade than fading a screen-sized sprite/layer?
Is there some functioniality in C2 for that?

I found the layout effects and am thinking of ramping up the gamma dynamically through 'set effect parameter'. but what is the variable for that I would be increasing per tick?
Last edited by facecrime on Sat Jan 03, 2015 2:52 pm, edited 1 time in total.
B
15
S
7
Posts: 243
Reputation: 2,058

Post » Sat Jan 03, 2015 2:09 pm

Are you talking about Gamma effect? there's just literally 1 parameter.

I'm not sure what you meant by "variable"
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Sat Jan 03, 2015 2:51 pm

yeah, let me rephrase: how do I ramp up gamma per tick?

not sure whether gamma would help me with my screen fade, what other smart options are there?
B
15
S
7
Posts: 243
Reputation: 2,058

Post » Sat Jan 03, 2015 3:31 pm

According to description of Gamma parameter, the values are only 0 to 3, But (while in layout view in C2) I personally tried values way higher than 3 like 50, 80, 100 (this looks closer to full black).

You can try a counter (using a global variable) that adds to itself every second and (for action) Set parameter 0 to a variable's value also (this variable's also being increased through time).

I never tried this btw, but I checked and there seems to be no expression for effect parameters, so you can't reference "the current parameter value then add 1" as expression (as far as I know)
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Sat Jan 03, 2015 3:38 pm

yeah that's my issue, hadn't thought of going through a global variable tho. thanks
B
15
S
7
Posts: 243
Reputation: 2,058

Post » Sat Jan 03, 2015 3:55 pm

@facecrime
can you paste a screenshot if ever something works for your fade?

I might also need this in the future for my game. thanks
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Sat Jan 03, 2015 7:53 pm

Right, here you go. Had issues getting gamma to work, no idea what parameter settings I need.

Instead I used the AdjustHSL-effect and ramped that up from a default value of 100

FadeWithHSLeffect.PNG


Not sure I'm completely satisfied the way the colors shift to white, but it's working at least :P
It seems the effect has issues with areas where alpha is at full opacity or tranparency.
You do not have the required permissions to view the files attached to this post.
B
15
S
7
Posts: 243
Reputation: 2,058


Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey, dop2000 and 9 guests