Benja Kepler’s SL Blog

A Night Light

March 16, 2008 · Leave a Comment

Copy and paste the script:-

float sun_height;
vector sun_position;
default
{
state_entry()
{

}

touch_start(integer total_number)
{
llSetTimerEvent(600.0);
}
timer()
{
sun_position = llGetSunDirection();
sun_height = sun_position.z;

if(sun_height < 0.0)
{
llSetPrimitiveParams([PRIM_FULLBRIGHT,
ALL_SIDES,
TRUE]);
}
else
{
llSetPrimitiveParams([PRIM_FULLBRIGHT,
ALL_SIDES,
FALSE]);
}

}
}

Categories: Building · Scripting · Tutorials

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment