It's in the oScreen object, in the Begin Step event, line 156.
else if (isLevel() and instance_exists(oPlayer1))
{
if (global.darkLevel and not oPlayer1.dead)
{
surface_set_target(darkSurf);
draw_set_color(c_black);
draw_rectangle(0, 0, screen_w, screen_h, false);
draw_set_color(make_color_rgb(255-255*oLevel.darkness,255-255*oLevel.darkness,255));
if (instance_exists(oLampRed))
{
with oPlayer1
{
distToLamp = distance_to_object(oLampRed);
if (distToLamp <= 96)
{
draw_set_color(make_color_rgb(255-distToLamp,120-(96-distToLamp),120-(96-distToLamp)));
}
}
}
if (instance_exists(oLampRedItem))
{
with oPlayer1
{
distToLamp = distance_to_object(oLampRedItem);
if (distToLamp <= 96)
{
draw_set_color(make_color_rgb(255-distToLamp,120-(96-distToLamp),120-(96-distToLamp)));
}
}
}
draw_circle(oPlayer1.x-view_xview[0], oPlayer1.y-view_yview[0], 96-64*oLevel.darkness, false);
with oFlare
{
draw_circle(x-view_xview[0], y-view_yview[0], 96, false);
}
with oFlareCrate
{
draw_circle(x-view_xview[0], y-view_yview[0], 96, false);
}
with oLamp
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 96, false);
}
with oLampItem
{
draw_circle(x-view_xview[0], (y-4)-view_yview[0], 96, false);
}
with oArrowTrapLeftLit
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oArrowTrapRightLit
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oTikiTorch
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oFireFrog
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oSpearTrapLit
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oSmashTrapLit
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oExplosion
{
draw_circle(x-view_xview[0], y-view_yview[0], 96, false);
}
with oLava
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 32, false);
}
with oScarab
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], 16, false);
}
with oGhost
{
draw_circle((x+16)-view_xview[0], (y+16)-view_yview[0], 64, false);
}
surface_set_target(screen);
draw_set_blend_mode_ext(bm_dest_color, bm_zero);
draw_set_alpha(1);
draw_surface(darkSurf, 0, 0);
draw_set_blend_mode(bm_normal);
}
If you want it to just light up like a scarab or whatever, you can just add:
with oYourObject
{
draw_circle((x+8)-view_xview[0], (y+8)-view_yview[0], YOURSIZEHERE, false);
}
Where YOURSIZEHERE is the radius of the circle in 16-pixel tiles (so a value of 16 would illuminate two tiles all around from the center, 8 would just illuminate the one tile, etc).
If you want it to behave more like a lamp, where the closer you get the brighter the screen gets, you'll just want to copy the lamp code:
if (instance_exists(oYourObject))
{
with oPlayer1
{
distToLamp = distance_to_object(oYourObject);
if (distToLamp <= 96)
{
draw_set_color(make_color_rgb(255-distToLamp,120-(96-distToLamp),120-(96-distToLamp)));
}
}
}