Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Region Time of Day

MariaBeatriz Beck
Registered User
Join date: 2 Aug 2007
Posts: 10
01-06-2008 09:14
I would like to know how to get the Region time of the day. I notice that the Region Time of the day goes between 06:00AM to 05:50AM (WindLight Enviromment Editor).


+--------------------------------------------+


Thanks,
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
01-06-2008 10:10
you could probuly screw around with llGetSunDirection

i mess with it, i have a lighting system set up with it
MariaBeatriz Beck
Registered User
Join date: 2 Aug 2007
Posts: 10
Do you mind
01-06-2008 10:20
From: Mrc Homewood
you could probuly screw around with llGetSunDirection

i mess with it, i have a lighting system set up with it



Thanks, do you mind to share a piece of code?
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
01-06-2008 10:27
CODE

default
{
state_entry()
{
llSetTimerEvent(600); // check every 5 minutes
}
timer() // what it dose every 5 minutes
{
vector sun = llGetSunDirection();
if(sun.z > 0) // = morning
{
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE]); // turns full bright off = day
}
else // if it is over = night
{
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE]); // turns on full bright
}
}
}


it is a farly simple script to make if you get the caluclations right, this one is just a simple night/day full bright command for a objects prim just to simulate a light