GMS 2 Please Help Light up Certain Areas in the Room

Hi,

I have found tutorials for lighting up a certain object, to make the room around them darker and a small area around an object brighter, but I can't find anything regarding areas of the room, like coordinates.

My goal is to have a lighting system like Enter the Gungeon, where if the player enters a certain room the area becomes bright and the rest of the game darker. Is this possible in Gamemaker?

For example, if a room in gamemaker is let's say 1000,1000 pixels.
area 1 is between (0-500 for x, and 0-1000 for y), and area 2 is (501-1000 for x, and 0-1000 for y)
is there a way to program it so when the player is in area 1 it is lit up, and if he goes into area 2 then area 2 will light up and area 1 will get darker?

Any help or tutorial to steer me in the right direction would be awesome! I can't find anything regarding this.
 
Top