How do I set a transparent color on a layer?

0 favourites
  • 2 posts
From the Asset Store
Full game Construct 2 capx code source to post on Google Play
  • Hi,

    I am brand new to C2 and as a learning exercise am in the process of recreating each of the example tutorials provided with the application. I am currently stuck on the example "Webcam - face shape.capx". In it, there is a webcam window and a sprite with the same dimensions and coordinates. They are on a transparent layer. The base layer has an image in the background. The sprite is basically a black rectangle with a transparent circle in the middle, and is designed to crop the webcam image.

    When the sprite is on the transparent layer, the black areas of the sprite appear transparent (though they block other objects below them in the same layer). If I move the sprite to the base layer, the black areas appear black.

    When I try to replicate this example, I cannot figure out how to make the black areas of the sprite transparent on a given layer. I have set the 'Force own texture' flag to 'Yes' for the transparent layer, but it does not seem to do anything. Can you please take a look at my attached test and help me understand what I did wrong? I have also attached the original example that I am trying to mimic for reference.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course, as soon as I post this I figure it out. It has to do with the 'blend mode' of the sprite. Has to be set to 'Destination out'. I need to do a bit more research on that setting.

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