Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a Flashlight?
- -Arc-Reactor-
-
6 posts
How to make a Flashlight?
I want to make a flashlight similar to the one in FNAF 2, but how?
- RT_Borg
-
1000+ posts
How to make a Flashlight?
Hi -Arc-Reactor-,
I'm not familiar with FNAF 2, but I think I know the flashlight effect you're asking about.
The idea is to use an image with a transparent circle in the middle, and a background color (probably black) around the transparent circle. The scratch costume editor can't make images with transparency, so it has to be made in another painting program and loaded into scratch. Or you could find a costume in a game that already has the effect, and use that.
If there are other sprites on layers below the sprite with the “flashlight” costume, you'll only see things where the transparent circle is. The rest is covered by the background colored part of the flashlight image.
– RT_Borg
I'm not familiar with FNAF 2, but I think I know the flashlight effect you're asking about.
The idea is to use an image with a transparent circle in the middle, and a background color (probably black) around the transparent circle. The scratch costume editor can't make images with transparency, so it has to be made in another painting program and loaded into scratch. Or you could find a costume in a game that already has the effect, and use that.
If there are other sprites on layers below the sprite with the “flashlight” costume, you'll only see things where the transparent circle is. The rest is covered by the background colored part of the flashlight image.
– RT_Borg
- RT_Borg
-
1000+ posts
How to make a Flashlight?
Here's a quick demo I put together. I'm sure you can find or make a better flashlight image than I drew.
Demo: Flashlight
https://scratch.mit.edu/projects/719557276
– RT_Borg
Demo: Flashlight
https://scratch.mit.edu/projects/719557276
– RT_Borg
- Adam-basha_tutorial
-
37 posts
How to make a Flashlight?
Hello I want to make a flashlight similar to the one in FNAF 2, but how?

If you want to make a flashlight. first thing you need is two pictures of a flashlight (one is on, o=another is off)then choose a cool button and write on off and on.
Then rename the buttons 1 and the other is 2.
Then start coding this code
Buttons:
Flash
I hope it worked
- cIoudyness
-
500+ posts
How to make a Flashlight?
I’m pretty sure if you used the eraser tool in the vector editor you could get a similar effect. Hi -Arc-Reactor-,
I'm not familiar with FNAF 2, but I think I know the flashlight effect you're asking about.
The idea is to use an image with a transparent circle in the middle, and a background color (probably black) around the transparent circle. The scratch costume editor can't make images with transparency, so it has to be made in another painting program and loaded into scratch. Or you could find a costume in a game that already has the effect, and use that.
If there are other sprites on layers below the sprite with the “flashlight” costume, you'll only see things where the transparent circle is. The rest is covered by the background colored part of the flashlight image.
– RT_Borg
best option for this is probably to draw a bitmap circle in some nonobtrusive color - perhaps a grey - and then fill that circle with “no fill”. sometimes bitmap is odd and some little pixels are left behind on the edges so using a grey is a good idea.
- SpaceExplorerPro
-
100+ posts
How to make a Flashlight?
Here's a quick demo I put together. I'm sure you can find or make a better flashlight image than I drew.
Demo: Flashlight
https://scratch.mit.edu/projects/719557276
– RT_Borg
If you want it to be more smooth try this:https://scratch.mit.edu/projects/719575423/
- RT_Borg
-
1000+ posts
How to make a Flashlight?
Hi SpaceExplorerPro 
Very nice! Thanks for sharing your improvement. It looks so much better with the semi-transparent penumbra around the transparent center.
I'll delete my rushed demo after this topic drops off the front page. I saved a link to your project, in case I see someone else ask about flashlights in Help.
– RT_Borg

Very nice! Thanks for sharing your improvement. It looks so much better with the semi-transparent penumbra around the transparent center.
I'll delete my rushed demo after this topic drops off the front page. I saved a link to your project, in case I see someone else ask about flashlights in Help.
– RT_Borg
- UnofficialHelpGuy
-
11 posts
How to make a Flashlight?
I have a Flashlight System that may be useful for this
https://scratch.mit.edu/projects/663417089/
https://scratch.mit.edu/projects/663417089/
- RT_Borg
-
1000+ posts
How to make a Flashlight?
Also very nice!
I bow down to the artistic prowess of @SpaceExplorerPro and @UnofficialHelpGuy
– RT_Borg
I bow down to the artistic prowess of @SpaceExplorerPro and @UnofficialHelpGuy
– RT_Borg
- -Arc-Reactor-
-
6 posts
How to make a Flashlight?
You guys are awesome, thank you for all the responses!
- -Arc-Reactor-
-
6 posts
How to make a Flashlight?
Hi -Arc-Reactor
I'm not familiar with FNAF 2, but I think I know the flashlight effect you're asking about.
Basically in FNAF 2 you can shine your flashlight into the hallway to scare off Foxy, and you can shine it on the cameras too.
- cIoudyness
-
500+ posts
How to make a Flashlight?
maybe you can have a second sprite for a “flashlight hitbox” or something that if foxy isn’t touching then he gets scared and runs offHi -Arc-Reactor
I'm not familiar with FNAF 2, but I think I know the flashlight effect you're asking about.
Basically in FNAF 2 you can shine your flashlight into the hallway to scare off Foxy, and you can shine it on the cameras too.
- -Arc-Reactor-
-
6 posts
How to make a Flashlight?
I haven’t tried any of these ideas yet as I have no internet currently (am using a phone right now), but I will try them when my internet returns. Thank you guys very much for these responses.
- -Arc-Reactor-
-
6 posts
How to make a Flashlight?
with this i saw his signature and thought it was part of the message, my bad I haven’t tried any of these ideas yet as I have no internet currently (am using a phone right now), but I will try them when my internet returns. Thank you guys very much for these responses.
- -Arc-Reactor-
-
6 posts
How to make a Flashlight?
How would I make the flashlight stay within the borders of the hitbox though?maybe you can have a second sprite for a “flashlight hitbox” or something that if foxy isn’t touching then he gets scared and runs offHi -Arc-Reactor
I'm not familiar with FNAF 2, but I think I know the flashlight effect you're asking about.
Basically in FNAF 2 you can shine your flashlight into the hallway to scare off Foxy, and you can shine it on the cameras too.
- SpaceExplorerPro
-
100+ posts
How to make a Flashlight?
Thank you. Hi SpaceExplorerPro
Very nice! Thanks for sharing your improvement. It looks so much better with the semi-transparent penumbra around the transparent center.
I'll delete my rushed demo after this topic drops off the front page. I saved a link to your project, in case I see someone else ask about flashlights in Help.
– RT_Borg

- cIoudyness
-
500+ posts
How to make a Flashlight?
the simplest way I can think of is to have two basically duplicate sprites of the flashlight, but one missing the vignette so it’s a harsh circle. then one of them can just always go to the other sprite.
- Discussion Forums
- » Help with Scripts
-
» How to make a Flashlight?