yeah sure you can do this..for each light object say you have a function like this:
Code:
function check_visibility()
{
var screenpos[3];

while(1)
{
vec_set(screenpos.x,my.x);

if (vec_to_screen(screenpos,camera)!=0)
{
my.lightrange=0;

}
else{my.lightrange=light_range;}


wait(1);
}

}