How to make a flashlight effect in GDevelop (Tutorial)

Someone in the comments on my newest YouTube video asked me how I made the flashlight effect in this video: FNaF fangame in GDevelop showcase - YouTube
So I’m going to show how I did it!

First I added a Light object and made it’s light bright.
image

Then I went to the layer called “Lighting” (I renamed it to just “Light”) and made the ambient light color black.


Then I made the light object go to where the mouse is on screen.

In the settings of the light object you can see something called “Light texture”, you can add a light texture to make it look even more like a flashlight than it does.
image

To make the light turn on and off I did this.


(Make sure that the flashlight on/off variable is set to 0 at the start of the scene!)

That’s how I did it!
Thanks for reading and check out the Game Jolt page too! :smiley:
https://gamejolt.com/games/anaj/784353

6 Likes

Whenever i made my ambient color of lighting to black and it made the whole screen black in testing

What color is the light object?