Unofficial LSL Reference

[[functions:llsetlinkalpha]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

This is an old revision of the document!


Function: llSeLinkAlpha

 llSeLinkAlpha(integer link, float alpha, integer face)

Parameters

An integer value defining the link number of the prim to be affected.

The following special link definition constants are available:- * LINK_ROOT refers to the root prim in a multi-prim linked set * LINK_SET refers to all prims * LINK_ALL_OTHERS refers refers to all other prims * LINK_ALL_CHILDREN refers to all children, (everything but the root) * LINK_THIS refers to the prim the script is in

alpha

A float value between 0.0 and 1.0 being the degree of opacity. 1.0 being fully opaque.

face

An integer value defining the face of the prim to be affected. ALL_SIDES affects all faces.

Notes

  • Note that the viewer shows transparency, not opacity, and it shows it in percentage. To convert from viewer transparency to an alpha value suitable for use with this function, use this formula: alpha=(100-transparency)/100. For example, a transparency of 35% is an alpha value of 0.65.
  • The function silently fails if 'face' indicates a face that does not exist, or if 'link' indicates a non-existent prim.

Short examples

llSeLinkAlpha(3, 0.5, 6); // Will set face 6 of link 3 to 50% transparent
llSetLinkAlpha(2, 0.0, ALL_SIDES);  // Will make link 3 or this object disappear

Complete examples

llSeLinkAlpha-example.lsl
// This will cause all other prims of the current object to blink on and off continuously (appear and disappear)
integer  flip;
default
{
    state_entry()
    {
        llSetTimerEvent(0.5);
    }
    timer()
    {
        flip = !flip;
        llSetLinkAlpha(LINK_ALL_OTHERS, flip, ALL_SIDES);
    }
}

See also