I want to create a box that essentially only shows everything within the area of that box, so I can have it hover above the gameplay area, but outside of the box the sprites don't show.
I plan on using this for tutorials, but without something similar to a "layer mask", I don't know where to begin.
Develop games in your browser. Powerful, performant & highly capable.
Okay, found a function called Blend Mode for layers and sprites, but I'm unsure if it's possible to do this.
For the tutorial I want to have 3 seperate boxes, and each box uses ingame assets that should only appear in it's chosen box and shouldn't leave the borders (like a layer mask)
However blend mode seems to leave everything black below or outside it, not transparent to the other layers.
Are you looking for something like flashlight effect?
It's sprite with 'destination out' set as blend mode, the layer is non transparent with black fill.
Basically I created a rough outline here: dl.dropbox.com/u/73774002/mask_test.capx
There are three boxes with outlines. Red boxes should only appear in the first box, blue in the second, and green in the third. All three outline boxes need to be visible.
Basically a layer mask around each 'box'.
With force texture and destination in I can get it how I want it, but force texture also blurs any scaled sprite even when I have point-scaling enabled. Surely there's a simpler way to mask what I want effeciently
Okay, I think I have it. Basically I'm surrounding what I want with the Destination Out mask sprite, then with WebGL Turned on and point sampling forcing texture.
This way nothing gets blurred and it seems to work fine.