Discuss Scratch

Npcbot_40
New to Scratch
11 posts

Flashlight In Scratch

I am having trouble making a scratch code for a flashlight. The way it works is that once I shine it on a specific part of a sprite, it brightens up. Can someone make a line of code that will help?
invalidaccess
Scratcher
100+ posts

Flashlight In Scratch

something like this?
https://scratch.mit.edu/projects/992970492/
i know it's not the best but i tried my best
Npcbot_40
New to Scratch
11 posts

Flashlight In Scratch

I have a big sprite though but kind of accurate
Npcbot_40
New to Scratch
11 posts

Flashlight In Scratch

But also for the background
Helmentloo
Scratcher
80 posts

Flashlight In Scratch

Here is a very complicated one if you are interested: Multiple light sources that is scalable to different intensity and size: https://scratch.mit.edu/projects/965185923/

Last edited by Helmentloo (April 1, 2024 17:18:24)

cs5186275
Scratcher
44 posts

Flashlight In Scratch

so basically I made mine by putting a cat or something on the project, making a circle that looks like the light from the flashlight and putting it on the layer that is under the cat, making another sprite that is the darkness by doing this; copy/pasting the light from the flashlight sprite, turning to bitmap, fill the rest of the sprite that isn't the light with black, switch fill color to clear, fill the light part in the middle with the clear color, and putting that new black layer above everything else, then I just put both of those sprites (not cat) to follow the mouse.
sorry for incomprehensive explanation lol

Powered by DjangoBB