How do I Fade entire Layers?

Get help using Construct 2

Post » Fri Aug 04, 2017 1:59 am

IS this possible? I want to have it when you pick up and item everything on the screen fades except the player_obj and collected_obj.

I see how to Fade objects themselves...but man that would take a long time to do each one individually.
Thaanks
B
9
S
2
Posts: 104
Reputation: 975

Post » Fri Aug 04, 2017 4:40 am

You would possibly be better off making a "fade mask" which is basically just a tiled background of plain white or plain black (or whatever colour you want to be your fade) then create this object on the layout, force it to z-order on top, then z-order the player and object in front of the mask.... then use opacity control or fade behaviour on the mask.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Fri Aug 04, 2017 12:28 pm

Ahhhhhhh.....SUPER SMART!!! Very helpful!
B
9
S
2
Posts: 104
Reputation: 975

Post » Sat Aug 05, 2017 2:45 pm

yep...that did it. Thanks!
B
9
S
2
Posts: 104
Reputation: 975

Post » Sat Aug 05, 2017 6:02 pm

it is a good idea,but new spawn sprite will cover the "fade mask".
B
7
S
4
G
1
Posts: 5
Reputation: 1,190

Post » Sun Aug 06, 2017 11:57 pm

mobileshadow wrote:it is a good idea,but new spawn sprite will cover the "fade mask".


You would just need some conditions to the fade mask, so if it exists it always draws on top, then moves the player and "object" in front - anything new will be created then "over-ridden" almost instantly, so the player "*shouldn't* see it.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Mon Aug 07, 2017 10:38 am

Extending the fade mask concept that @SoldjahBoy proposes:

I normally add a layer named "Fade" to the each layout in my project, set it to the top layer, mark it as global and then add the fade mask to it. That way the fade always sits on top of all layers and I only have to add the fade mask once. You can then create a function to fade the "Fade" layer itself or add the fade behaviour to the mask and call the behaviour each time you want to fade in/out.
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Mon Aug 07, 2017 11:54 pm

Yep what @mekonbekon said will work great for a "global" fade that covers everything up... like if you want to do some kind of transition or "screen flash".

I think the problem OP had though was to have two objects in front of the fade (the player and the object the player was interacting with at the time) so you'd need to juggle some objects around (or shift them to a layer that's above the fade layer) to achieve something like that.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 9 guests