Don't click here unless you want to be banned.

LSL Wiki : LibraryFadeTexture

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
//Please remind this is only a function and must be called from an event handler!
// Call this from an event handler.
// Currently only fades the top.
// Set kSide to ALL_SIDES to fade all sides.
integer kSide = 0;

fade_in_and_out()
{
    integer steps = 15;
    float base = 0.85;
    float delay = 1.0 / steps;
    integer i;
    
    // fade up
    for (i = 0; i < steps; i++)
    {
        llSetAlpha(1.0 - llPow(base,i), kSide);
        llSleep(delay);
    }
    
    llSetAlpha(1.0, kSide);
    llSleep(4);
    
    // fade out
    for (i = 0; i < steps; i++)
    {
        llSetAlpha(llPow(base,i), kSide);
        llSleep(delay);
    }
    
    llSetAlpha(0.0, kSide);
}

ScriptLibrary
Comments [Hide comments/form]
The very end of this script is NOT correctly formatted
-- pool-71-96-249-234.dfw.dsl-w.verizon.net (2007-03-05 22:08:38)
This one gives me an error at Line 30.
-- c-76-22-146-122.hsd1.tn.comcast.net (2008-01-05 11:46:21)
Attach a comment to this page: