Jump to content

Rapid day cycle/moving sun


You are about to reply to a thread that has been inactive for 465 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

44 minutes ago, Abbiabigail said:

Amazing thank you! Any idea where I can find a guide that would help me do that? I've never worked with scripts that alter environment settings before, but I'm willing to learn! :) 

If you have a set of sky settings, you can add a script like this and your settings (named in alphabetical order you want them to play) to an object on the parcel. The script needs to be compiled to an experience and the experience needs to be enabled on the land where it's running.

float gFrequency = 5.0; // seconds between environment changes
integer gIndexSky;
string gEnv;
default
{
    state_entry()
    {   llSetTimerEvent(gFrequency);
    }
    timer()
    {   gIndexSky=(gIndexSky+1)%llGetInventoryNumber(INVENTORY_SETTING);
        gEnv = llGetInventoryName(INVENTORY_SETTING,gIndexSky);
        list agents = llGetAgentList(AGENT_LIST_PARCEL,[]);
        integer i = llGetListLength(agents);
        while(~--i)
        {   llRequestExperiencePermissions(llList2Key(agents,i),"");
        }
    }
    experience_permissions(key ID)
    {   llReplaceAgentEnvironment(ID,gFrequency,gEnv);
        //llOwnerSay("Debug: set env for "+(string)ID);
    }
}

Getting the sun/moon positions to line up in a pleasing way is actually quite tricky though. I didn't manage anything presentable while fooling around.

  • Thanks 1
Link to comment
Share on other sites

Yes, you can, but please don't do it on mainland. It's really annoying when someone flies over the parcel and the sky goes crazy. If you really want that on a small scale, animate a sim surround in a skybox. That will keep the effect local.

There's a speed limit on environment changes. It's probably faster than it should be. A reasonable limit would be a full day/night change in 30 seconds to 2 minutes, so when you entered a parcel out of sync with its neighbors, the effect was like a sunset, not like turning off the lights. If you TP in, of course, it's instant.

  • Like 1
Link to comment
Share on other sites

1 hour ago, animats said:

It's really annoying when someone flies over the parcel and the sky goes crazy.

with scripted changes, you can target agents who are within some boundary and who have accepted an experience. That seems sane enough to me?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 465 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...