Help with ShadowLight + masks to make directional flashlight

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi there,

    I know this topic is popular but I'm doing a different kind of flashlight from what I've seen here and wanted to know if it's possible to achieve what I want.

    I've used a ShadowLight object + a mask to make a classic directional flashlight, but in my game, all background that is not touched by light is darker and greyed out, and enemies are not visible in the shadows. I've achieved that by making a copy of the tilemap and placing it in a different layer underneath, using the Destination Out blend mode for the ShadowLight object, and Destination In for the cone shaped mask. It worked out well until I tried to add another light source, it didn't go as I thought. I've tried to place another mask on top but it's not working (I've tried it in different layers and every blend mode), so I don't know if it's actually possible with this method.

    C3P file: dropbox.com/s/un72ab2eyln7xuv/flashlight_sample.c3p

    So my 2 questions are:

    1) is it possible? (I'm probably doing something wrong here)

    2) if it's not, do you think there's another workaround for my intended idea?

    Thank you!

  • Yeah, adding a second light source may be impossible.

    Here is a completely different approach, based on the official template:

    howtoconstructdemos.com/improved-stealth-game-template-how-to-make-a-visible-cone-of-view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, adding a second light source may be impossible.

    Here is a completely different approach, based on the official template:

    https://howtoconstructdemos.com/improved-stealth-game-template-how-to-make-a-visible-cone-of-view/

    Thanks for your response! I'm afraid that sample is a bit away from what I intend, but thank you anyways.

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