llGetPrimitiveParams

From Second Life Wiki
Revision as of 17:23, 23 February 2007 by Strife Onizuka (talk | contribs)
Jump to navigation Jump to search

Summary

Function: list llGetPrimitiveParams( list params );
0.2 Forced Delay
10.0 Energy

Returns a list that is the primitive parameters specified in the params list.

• list params

Caveats

  • This function causes the script to sleep for 0.2 seconds.

Examples

Useful Snippets

list GetPrimitiveParams(list input)
{//Returns a list that can be fed to llSetPrimitiveParams
    list output;
    integer c = -llGetListLength(input);
    integer flag;
    integer side;
    while(c & 0x80000000)
    {
        flag = llList2Integer(input, c++); //pop the stack
        if(llListFindList([PRIM_BUMP_SHINY, PRIM_COLOR, PRIM_TEXTURE, PRIM_FULLBRIGHT], [flag]) + 1)
        {
            side = llList2Integer(input, c++); //pop the stack
            if(side == ALL_SIDES)
            {
                side = llGetNumberOfSides();
                while(side--) //we return the sides in reverse order, easier to code; runs faster.
                    output += [flag, side] + llGetPrimitiveParams([flag, side ]);
            }
            else
                output += [flag, side] + llGetPrimitiveParams([flag, side ]);
        }
        else
            output += flag + llGetPrimitiveParams([flag]);
    }
    return output;
}
//Contributed by Strife Onizuka

See Also

Functions

•  llSetPrimitiveParams Set many primitive parameters

Deep Notes

Signature

function list llGetPrimitiveParams( list params );