Jump to content

bright, glow and alpha


Ayane Philly
 Share

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

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

Recommended Posts

All you need to script is a simple toggle switch.  Basically

integer iSwitch;

default
{
    state_entry()
    {
        llSetTimerEvent(2.0);   //Or whatever time you want ...
    }

    timer()
    {
        iSwitch = !iSwitch;
        if (iSwitch)
        {
            //  Turn stuff ON
        }
        else
        {
            // Turn stuff OFF
        }
    }
}

And in this case, you use llSetLinkPrimitiveParams to set your desired values of alpha (in the PRIM_COLOR paramater) and PRIM_GLOW. (EDIT: Oh yes, and PRIM_FULLBRIGHT.  Thank you, Fritgern.  :) )

Edited by Rolig Loon
typos, of course
  • Like 1
Link to comment
Share on other sites

Try this: 

default
{
    state_entry()
    {     
        llSetTimerEvent(2);
    }
 
    timer()
    {
        llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_FULLBRIGHT, ALL_SIDES, 1,
                                                 PRIM_GLOW, ALL_SIDES, 1.0, 
                                                 PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]);
    }
}

Note that I used PRIM_COLOR to set the alpha, because there is no constant for alpha I had to use the alpha property of PRIM_COLOR.
Alternatively, you can use llSetAlpha(0.5, ALL_SIDES); instead of the PRIM_COLOR thing.

Edited by Fritigern Gothly
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1598 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...