vec_set(temp,my.x);
if (vec_to_screen(temp,camera)){
my.light=on;
my.lightrange=300; //could be set also to a skill
my.red=my.skill1; //just put in the r,g,b values
my.green=my.skill2;
my.blue=my.skill3;
my.cast=on; //casts a shadow when on
}
else{
my.lightrange=0; //if too far away turn it off
my.light=off;
my.cast=off;
}
wait(1);
}
}
Use that for your dynamic light action. That *should* only show a light if it is on the screen itself, though I havn't tried it out. It would be better to use trace though I suppose... Let me know if it bugs out though, and I'll fix it.