Help with flashlight and dark rooms

note: changed name because it sounds too generic.

hi, i am currently trying to create a segment of a horror game where you are in a dark room and you use your flashlight to not only light up the place, but solve a puzzle and ward away whatever comes by. this is hard because to do this, i need a dark room first. fortunately, i have already found a solution. you just create a whole layer of dark squares that is over the frame, and if they touch the light from the flashlight, they go invisible, when it isn’t, you can now see it. yes, very smart.

thats probably what i would agree with if it weren’t for the enormous amount of clip objects required in order to create this effect. id say it’d take about 250+ of these squares to complete this, but this is 250 squares too many, i have already dug too, and ive tried clip.breakapart(), but no avail. i need help with either solving this problem with lag or finding an alternate solution, any help would help. thank you.

and a side note, the way the flashlight works is it will be on a anchor-like object unless the mouse is down, then it will follow the mouse until it is released.

the example file:
My Project11-4-2022_16-24-23.wick (2.0 KB)

so what I did was add a big black square you see, then I turned down its opacity, then I put the yellow circle in the middle of the black square you see, then I clicked the down arrow at the top and clicked subtract, so you see, now the square has a circle in the middle for the circle to sit in, then I made the black square follow the circle, problem solved, im pretty sure if you want the light to have a circle hitbox then there is a code for that but I don’t remember it. My Project11-4-2022_15-49-23.wick hope this helped.

thank you, ill be sure to give you some credit too once i am done

that aged poorly