Blending Modes

00george

  • Posts: 161
Hi in stencyl im trying to make my own light system. I have a slightly transparent black square and a even more transparent black circle which follows the character when the character gets close to the lamp the transparentsy increases. I have managed to make this but the problem is that the black squares covers over the black circle. Is there anyway to cut out the black circle out of the black square using blending modes or something different. I made a crappy diagram in paint to help you.

rob1221

  • *
  • Posts: 9473
If it's just one light source, why not make the whole thing one actor like in the maze example game?  Otherwise you'll have to manipulate the BitmapData as described in this thread: http://community.stencyl.com/index.php/topic,9689.0.html

Hectate

  • *
  • Posts: 4643
I think that's the problem. The description and image are difficult to decipher, but I believe that he wants multiple light sources. Is this correct?
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

00george

  • Posts: 161
Um Yea im really sorry about my descriptions. I do want multiple light sources. I will have a read through of that other thread it looks useful. I don't understand the code too well but does it basicly replace some of the masks pixels with the other actors pixels?

« Last Edit: July 20, 2012, 02:58:16 pm by 00george »

rob1221

  • *
  • Posts: 9473
Yeah, it replaces the pixels.  Note that with that method you still can't have light sources close to each other.  To do so requires something more complicated for sure.