How do I Fade entire Layers?

  • 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

  • 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

  • Ahhhhhhh.....SUPER SMART!!! Very helpful!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yep...that did it. Thanks!

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

  • 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

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

  • 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

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