Simple and easy to use light and glow scripts. They turn on when the sun goes down and turn off when it comes up. Scripts look for sun position every 150 seconds, Can easly be changed. Light Script float sun_height;
vector sun_position;
default
{
state_entry() {
llSetTimerEvent(150);
}
timer() {
sun_position = llGetSunDirection();
sun_height = sun_position.z;
if(sun_height < 0.0)
{
llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 1.0, 1.0>,1.0,15,0.750]);
}
else
{
llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 1.0, 1.0>,1.0,15,0.750]);
}
}
} Glow Script float sun_height;
vector sun_position;
default
{
state_entry() {
llSetTimerEvent(150);
}
timer() {
sun_position = llGetSunDirection();
sun_height = sun_position.z;
if(sun_height < 0.0)
{
llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, 0.4]);
}
else
{
llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, 0.0]);
}
}
} Simple and easy :)