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

LSL Wiki : llSetPrimitiveParams

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-54-163-84-199.compute-1.amazonaws.com
llSetPrimitiveParams(list rule)

This function changes any number of properties (or "parameters") of a prim in one operation. The parameter is a list of changes. (Don't confuse prim parameters with function parameters.)

The list is parsed and executed one element at a time.

It takes a list as an argument, much as llParticleSystem does. The list always starts with a constant determining the type of change, followed by the parameters that are required by that constant, and then more constant+parameters may follow. For example:

llSetPrimitiveParams([
    PRIM_SIZE, <1, 1, 1>,  
    PRIM_COLOR, ALL_SIDES, <1, 0, 0>,1.0
   ]); //sets the size of the prim to 1x1x1, and then the color of the prim to red

There are many constants that can be used. See the following tables.

Notes
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, 
     <0, 0, 0>, 1.0, PRIM_COLOR, 0, <0, 1, 0>, 1.0]);
...will turn all sides except face 0 black (<0, 0, 0>); face 0 will turn green (<0, 1, 0>).
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, <0, 0, 0>, 1.0,PRIM_PHANTOM, TRUE]);
...will turn all sides black (<0, 0, 0>); and set the object phantom

Rules (whenever the "Parameter(s)" column references a PRIM_xxx constant, it can be found in the tables below this one):
Constant Name Description
Alternative
Parameter(s) Example Rule Value
PRIM_BUMP_SHINY Sets bumpmapping and shininess of a face integer face, PRIM_SHINY_xxx, PRIM_BUMP_xxx [PRIM_BUMP_SHINY, 2, PRIM_SHINY_LOW, PRIM_BUMP_GRAVEL] 19
PRIM_COLOR Sets color and alpha of a face
llSetColor, llSetAlpha
integer face, vector color, float alpha [PRIM_COLOR, 1, <1, 0, 0>, 0.75] 18
PRIM_FLEXIBLE Toggles flexible property and attributes: softness, gravity, drag (friction), wind, tension, and force. boolean TRUE/FALSE, integer softness, float gravity, float friction, float wind, float tension, vector force [PRIM_FLEXIBLE, TRUE, 2, 0.3, 2.0, 0.0, 1.0, <0, 0, 0>] 21
PRIM_FULLBRIGHT Sets full bright of a face on or off. integer face, boolean on
on = TRUE/FALSE
[PRIM_FULLBRIGHT, ALL_SIDES, TRUE] 20
PRIM_GLOW Sets WindLight prim glow intensity of a face. (To be fully functional in 1.19.2, see WindLight: Make glow scriptable. Note also that the glow is not rendered for HUDs ) integer face, float intensity
[PRIM_GLOW, ALL_SIDES, 1.0] 25
PRIM_MATERIAL Sets material of the prim PRIM_MATERIAL_xxx [PRIM_MATERIAL, PRIM_MATERIAL_RUBBER] 2
PRIM_PHANTOM Sets phantom property of an object
llSetStatus
TRUE/FALSE [PRIM_PHANTOM, TRUE] 5
PRIM_PHYSICS Sets physics property of an object
llSetStatus
TRUE/FALSE [PRIM_PHYSICS, TRUE] 3
PRIM_POINT_LIGHT Toggles light property and attributes: color, intensity, radius, and falloff. TRUE/FALSE, vector color, float intensity, float radius, float falloff [PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 10.0, 0.75] 23
PRIM_POSITION Moves object to position.
This will silently fail for a child prim of a link set if the child prim exceeds the link distance! Also, as with llSetPos, will not move an object below ground; its center will be set at ground height.
llSetPos
vector position [PRIM_POSITION, <128, 128, 40>] 6
PRIM_ROTATION Sets the rotation of the object
llSetRot
rotation rot [PRIM_ROTATION, <0, 0, 0, 1>] 8
PRIM_SIZE Sets the scale of an object (Between <0.01,0.01,0.01> and <64,64,64>)
llSetScale
vector size [PRIM_SIZE, <4, 3, 0.1>] 7
PRIM_TEMP_ON_REZ Sets temporary on rez property of an object TRUE/FALSE [PRIM_TEMP_ON_REZ, TRUE] 4
PRIM_TYPE Sets the basic prim type; will unsit all avatars on object. See next table   9
PRIM_TEXGEN Sets the texture mapping mode, either PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR. integer face, integer type [PRIM_TEXGEN, ALL_SIDES, PRIM_TEXGEN_DEFAULT] 22
PRIM_TEXTURE Sets the texture properties of a face
llSetTexture, llScaleTexture, llOffsetTexture, llRotateTexture
integer face, string name, vector repeats, vector offsets, float rotation
Note: name can be the name of a texture in the prim's contents or the key of a texture, but must be of type string. Seems you can use a raw key now without typecasting to string (08/08) - ED
[PRIM_TEXTURE, 0, "66864f3c-e095-d9c8-058d-d6575e6ed1b8", <1,1,1>, <0,0,0>, 0] 17
PRIM_TEXT Sets the text property of a prim
llSetText
string text, vector color, float alpha
Note: To remove text from a prim, leave text empty
[PRIM_TEXT, "Hello world", <1.0, 1.0, 1.0>, 1.0] 26
Constants for PRIM_TYPE and their parameters (these are always preceded by the prefix PRIM_TYPE ):
Constant Name Value Type Parameter(s) Example rule
PRIM_TYPE_BOX 0 Box integer holeshape, vector cut, float hollow, vector twist, vector taper_b, vector topshear [PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>]
PRIM_TYPE_CYLINDER 1 Cylinder integer holeshape, vector cut, float hollow, vector twist, vector taper_b, vector topshear [PRIM_TYPE, PRIM_TYPE_CYLINDER, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>]
PRIM_TYPE_PRISM 2 Prism integer holeshape, vector cut, float hollow, vector twist, vector taper_b, vector topshear [PRIM_TYPE, PRIM_TYPE_PRISM, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>]
PRIM_TYPE_SPHERE 3 Sphere integer holeshape, vector cut, float hollow, vector twist, vector dimple [PRIM_TYPE, PRIM_TYPE_SPHERE, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>]
PRIM_TYPE_TORUS 4 Torus integer holeshape, vector cut, float hollow, vector twist, vector holesize, vector topshear, vector profilecut, vector taper_a, float revolutions, float radiusoffset, float skew [PRIM_TYPE, PRIM_TYPE_TORUS, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 0.25, 0.0>, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0]
PRIM_TYPE_TUBE 5 Tube integer holeshape, vector cut, float hollow, vector twist, vector holesize, vector topshear, vector profilecut, vector taper_a, float revolutions, float radiusoffset, float skew [PRIM_TYPE, PRIM_TYPE_TUBE, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 0.25, 0.0>, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0]
PRIM_TYPE_RING 6 Ring integer holeshape, vector cut, float hollow, vector twist, vector holesize, vector topshear, vector profilecut, vector taper_a, float revolutions, float radiusoffset, float skew [PRIM_TYPE, PRIM_TYPE_RING, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 0.25, 0.0>, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0]
PRIM_TYPE_SCULPT 7 Sculpted string map, integer type [PRIM_TYPE, PRIM_TYPE_SCULPT, "c110440b-c276-88fb-9f3b-abf123f7ea2b", PRIM_SCULPT_TYPE_SPHERE]

For access to the old PRIM_TYPE format, use 1 instead of PRIM_TYPE - BW

Notes on the above parameters:
Parameter Note
repeats x and y range from 0.0 to 100 (z is ignored)
offsets x and y range from -1 to 1 (z is ignored)
cut/dimple/profilecut x and y range from 0.0 to 1.0, x must be at least 0.05 smaller than y (z is ignored)
hollow ranges from 0.0 (solid) to 0.95 (maximum hollowed)
twist boxes, cylinders, prisms
ranges from -0.5 (-180 degree in the edit window) to 0.5 (+180 degree in the edit window) for both x and y (z is ignored)
spheres, tubes, torii, rings
ranges from -1.0 (-360 degree in the edit window) to 1.0 (+360 degree in the edit window) for both x and y (z is ignored)
holesize


taper_b
x ranges from 0.05 to 1.0
y ranges from 0.05 (large hole) to 0.50 (no hole)
ranges from 0.0 to 2.0 for both x and y (z is ignored)
topshear ranges from -0.5 to 0.5 for both x and y (z is ignored)
taper_a ranges from -1.0 to 1.0 for both x and y (z is ignored)
revolutions ranges from 1.0 to 4.00
radiusoffset depends on holesize y and revolutions
skew
See the restrictions table on the LibraryPrimTorture page; it looks more complete.

holeshape constants (for PRIM_TYPE parameters):
Constant Value Shape
PRIM_HOLE_DEFAULT 0 default (matches the prim type: square for box, circle for cylinder, etc.)
PRIM_HOLE_SQUARE 32 square
PRIM_HOLE_CIRCLE 16 circle
PRIM_HOLE_TRIANGLE 48 triangle

type flags (for PRIM_TYPE_SCULPT parameters):
Constant Value Shape
PRIM_SCULPT_TYPE_SPHERE 1 sphere (Converge top & bottom, stitch left side to right)
PRIM_SCULPT_TYPE_TORUS 2 torus (Stitch top to bottom, stitch left side to right)
PRIM_SCULPT_TYPE_PLANE 3 plane (No stitching or converging)
PRIM_SCULPT_TYPE_CYLINDER 4 cylinder (Stitch left side to right, leave top and bottom open)

Bumpmapping constants (for PRIM_BUMP_SHINY):
Constant Value Description
PRIM_BUMP_NONE 0 none: no bump map
PRIM_BUMP_BRIGHT 1 brightness: generate bump map from highlights
PRIM_BUMP_DARK 2 darkness: generate bump map from lowlights
PRIM_BUMP_WOOD 3 woodgrain
PRIM_BUMP_BARK 4 bark
PRIM_BUMP_BRICKS 5 bricks
PRIM_BUMP_CHECKER 6 checker
PRIM_BUMP_CONCRETE 7 concrete
PRIM_BUMP_TILE 8 crustytile
PRIM_BUMP_STONE 9 cutstone: blocks
PRIM_BUMP_DISKS 10 discs: packed circles
PRIM_BUMP_GRAVEL 11 gravel
PRIM_BUMP_BLOBS 12 petridish: blobby amoebalike shapes
PRIM_BUMP_SIDING 13 siding
PRIM_BUMP_LARGETILE 14 stonetile
PRIM_BUMP_STUCCO 15 stucco
PRIM_BUMP_SUCTION 16 suction: rings
PRIM_BUMP_WEAVE 17 weave

Shininess constants (for PRIM_BUMP_SHINY):
Constant Value Description
PRIM_SHINY_NONE 0 none
PRIM_SHINY_LOW 1 low
PRIM_SHINY_MEDIUM 2 medium
PRIM_SHINY_HIGH 3 high

Material constants (for PRIM_MATERIAL):
Constant Value Description
PRIM_MATERIAL_STONE 0 stone
PRIM_MATERIAL_METAL 1 metal
PRIM_MATERIAL_GLASS 2 glass
PRIM_MATERIAL_WOOD 3 wood
PRIM_MATERIAL_FLESH 4 flesh
PRIM_MATERIAL_PLASTIC 5 plastic
PRIM_MATERIAL_RUBBER 6 rubber
PRIM_MATERIAL_LIGHT 7 light (deprecated in SL 1.9.1)

Q & A

Q: What happened to the topsize PRIM_TYPE parameter for boxes, cylinders, and prisms?
A: This was changed to taper in SL 1.10. It works exactly the same as topsize did for values from 0.0 to 1.0, but now it also accepts values from -1.0 to 0.0. Negative values shrink the bottom face instead of the top one. In this way, it is now analogous to the pre-existing taper parameter for torii, tubes, and rings.

Q: Is there any way to flip a texture within a script? You have x and y flip toggles in the edit dialog, but I can't find a way to do this from a function.
A: Yes. Use negative values in the repeats vector.

Q: With llSetPrimitiveParams, you can set almost everything about a prim that you can with llSetScale(), llSetColor(), llSetPos(), llSetRot(), etc. Will these be officially deprecated?
A: No. There are cases where the individual functions are still useful. For instance, they're significantly faster than llSetPrimitiveParams, both for scripters to write, and scripts to parse because they're simple variables and not a list, thus making them very practical for most simple manipulation of prims.

Q: Can I set a texture animation with llSetPrimitiveParams?
A: No. llSetTextureAnim remains the only way to do it.

Q: Does PRIM_POSITION use global, region, or local coordinates?
A: It works exactly like llSetPos, using region coordinates when it's the root prim and not an attachment. For child prims, or root attachments, it uses local coordinates.

Q: Is there any documentation for the old PRIM_TYPE format around anywhere?
A: Sort of, browse the revision history, anything before 8-31-2004 is before the change over; The old interface was lacking in many respects. I recommend using one of the LibraryPrimTorture encapsulation functions; they solve the problem of having to deal with the different number of paramaters required for each prim type.

Q: What is up with taper_a & taper_b?
A: Before SL 1.11 boxs, cylinders & prisms had an attribute called top_size, ranging from 0.0 (no top) to 1.0 (full top). In 1.11 they retrofitted the attribute so that it could adjust the size of the bottom of the prim aswell. For lack of a better name, they renamed the attribute to taper (taper_b). What they did not do was adjust the range to be the same as in the client, as that would break existing content (I suggested they create a new PRIM_TYPE flag like they had in the past; they did not). In the client they made the range -1.0 -> 1.0, while in scripting the range was to be 0.0 -> 2.0 (to convert do: 1.0 - value). To confuse things the old top_size attribute occupies the same address in the object description structure as hole_size. Since taper_a, taper_b have different ranges, occupy different address and co-exist, for sake of sanity and readabilty I have renamed them for this piece of documentation. I meant to fix the documentation earlier it just slipped my mind. -- BW

Q: Help! This function doesn't typecast the parameters, and I'm getting non-integer rule errors and stuff!
A: Try this magical function that figures out what datatypes the list elements appear to be and casts them to the right thing...
///////////////////////////////////////////////////////////////////////////////
//
// ccFixListDatatypes
//      Walks a list and casts the data to the appropriate type, then returns
//  the cast list.  Useful for things like llSetPrimitiveParams when data is
//  parsed from strings.
//
//  v3 - Initial public release
//  v4 - Fixes parsing of negative elements in vectors and rotations.
//
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008, Ceawlin Creations
// All rights reserved.
// 
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 
//     * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//     * Neither the name of Ceawlin Creations, Liandra Ceawlin, or A. J.
// Taylor, nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written
// permission.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////

// This code is far from optimal, lol.
list    ccFixListDatatypes( list l )
{
    //Liandra Ceawlin 2008-09-20
    integer i;
    for( i=0; i<llGetListLength(l); i++ )
    {
        integer is_integer = TRUE;
        integer is_float = TRUE;
        integer is_vector = TRUE;
        integer is_rot = TRUE;
        integer j;
        string s = llStringTrim(llList2String(l,i),STRING_TRIM);
        if( s == "" )
            jump cont1;
        for( j=0; j<llStringLength(s); j++ )
        {
            string c = llGetSubString(s,j,j);
            if( (integer)c==0 && c!="0" )
            {
                is_integer = FALSE;
                if( c != "." )
                    is_float = FALSE;
            }
        }
        if( llGetSubString(s,0,0)=="<" && llGetSubString(s,llStringLength(s)-1,llStringLength(s)-1)==">" )
        {
            string tmp = llDeleteSubString(s,0,0);
            tmp = llDeleteSubString(tmp,llStringLength(tmp)-1,llStringLength(tmp)-1);
            list tl = llParseString2List(tmp,[","],[]);
            if( llGetListLength(tl) == 3 )
                is_rot = FALSE;
            else if( llGetListLength(tl) == 4 )
                is_vector = FALSE;
            else
            {
                is_rot = FALSE;
                is_vector = FALSE;
                jump cont2;
            }
            for( j=0; j<llGetListLength(tl); j++ )
            {
                integer k;
                string ts = llStringTrim(llList2String(tl,j),STRING_TRIM);
                for( k=0; k<llStringLength(ts); k++ )
                {
                    string tc = llGetSubString(ts,k,k);
                    if( (integer)tc==0 && tc!="0" && tc!="." && tc!="-" )
                    {
                        is_rot=FALSE;
                        is_vector = FALSE;
                        jump cont3;
                    }
                }
            }
        }
        else
        {
            is_vector = FALSE;
            is_rot = FALSE;
        }
        list n;
        if( is_integer )
            n += (integer)s;
        else if( is_float )
            n += (float)s;
        else if( is_vector )
            n += (vector)s;
        else if( is_rot )
            n += (rotation)s;
        else
            jump cont4;
        l = llListReplaceList(l,n,i,i);
        @cont1;
        @cont2;
        @cont3;
        @cont4;
    }
    return l;
}

default
{
    on_rez( integer param )
    {
        llSay( 0, "Open your script error/warning window and touch me to run the test." );
    }
    
    touch_start(integer det)
    {
        llSay( DEBUG_CHANNEL, "Testing..." );
        list shape= llGetPrimitiveParams([PRIM_TYPE]);
        
        // cast shape to all strings, like we just parsed it out of some chat or something....
        integer i;
        for( i=0; i<llGetListLength(shape); i++ )
            shape = llListReplaceList( shape, [llList2String(shape,i)], i, i );
            
        llSay( DEBUG_CHANNEL, "This will cause an error." );
        llSetPrimitiveParams( shape );
        
        // Cast the string list into the proper datatypes.
        list new = ccFixListDatatypes( shape );
        llSay( DEBUG_CHANNEL, "But this shouldn't..." );
        llSetPrimitiveParams( [PRIM_TYPE]+new );
        
        llSay( DEBUG_CHANNEL, "Done." );
    }        
}
-- LiandraCeawlin


See also llGetPrimitiveParams, llSetLinkPrimitiveParams.


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Prim
Comments [Hide comments/form]
Interestingly, if a call to llSetPrimitiveParams(PRIM_BUMP_SHINY,...) is made with an intentionally misformatted parameter list, the runtime exception that is throw contains a typo: "llSetPrimitiveParams error: rule () error, PRIM_BUMP_SHNIY [SIC] has missing or bad shiny." Note "SHNIY" not "SHINY" in the error spelling. Could this be a clue as to the underlying problem in this version of the call (present through at least SL client v1.3.3...) I hope so, 'cause I submitted it as an error.
-- ChromalBrodsky (2004-04-08 23:10:54)
That would be amusing if it were the case, Chromal. What was the Linden response?
-- CatherineOmega (2004-04-15 05:40:10)
I got a reply to my bug report yesterday stating that this was a legitimate bug and asking for more specifics. I guess they're on the case, now!
-- ChromalBrodsky (2004-04-16 11:55:27)
I'm submitting a bug report against this also, but [in LSL 1.4.6], PRIM_TEXTURE wants the "id" field to be a *string*, not a *key*. If you pass a key, it responds "llSetPrimitiveParams error: rule 0 error, PRIM_TEXTURE has missing or bad texture name.". Pass the exact same information as a string, and it works.
-- NeoRebus (2004-07-07 04:18:23)
This may be obvious but it tripped me up, so it might trip up others. With PRIM_TEXTURE, if you give a 'rotation' value of 0 rather than 0.0, it fails, somewhat counterintuitively, with a 'missing or bad texture name' error. I guess because it's parsing a list of values it expects things the exact type that they need to be, so it doesn't do the explicit cast of integer to float that you'd normally expect, so probably true of all other float parameters too.
-- JonathanShaftoe (2005-02-17 12:36:38)
That is correct llSetPrimitiveParams expects the exact format and will throw an error if you pass it anything else.
-- BlindWanderer (2005-03-24 17:22:06)
Why... can't it accept stuff that is valid for near match typecasting? float<->integer string<->key?
-- IceBrodie (2005-05-13 12:15:30)
because that sort of typecasting is done by the compiler when the script is compiled not by the sim.
-- BlindWanderer (2005-05-14 21:37:53)
It would still be preferable for llSetPrimitiveParams to typecast. I often find myself having to transfer primitive parameters messages via a string - to do this so that llSetPrimitiveParams doesnt complain, I have to store the type information along with the actual data. This type-storing procedure is very expensive, as the script must iterate through every element in the parameter list. These lists can potentially be quite massive; a process such as transferring the texture data for all sides of a prim is prohibitively time consuming.
-- ChristopherOmega (2005-08-10 12:32:52)
While attempting to use this function on a child prim to adjust rotation and position simultaneously, I spent forever trying to get it to work right. Eventually I found that it was not working equivelant to llSetRot() on child prims, instead was doing something like: MyRot * llGetRootRotation() . I was able to compensate of course by feeding it (MyRot / llGetRootRotation()) . I filed a bug report as this was messing me up big time and just does not seem right. This is a bug, right?
-- RichardSolvang (2005-08-24 21:36:23)
llSetPrimitiveParams([PRIM_ROTATION, rot]) seems to do the same as llSetRot rather than llSetLocalRot when in a child prim. Some correcting for the rotation of the base prim is therefore necessary.
-- SeifertSurface (2005-09-15 19:45:05)
More accurately, PRIM_ROTATION always acts like llSetRot.
-- WolfWings (2005-10-03 19:50:46)
Gragh! Hours wasted trying to track down why my script wasn't working.

If you use llSetPrimitiveParams() to change multiple attributes, (texture + shine, etc) to try to circumvent the scriptdelay associated with making two calls, you will run into problems on complex sets. For example, take the following example (arranged as such to illustrate the problem)

llSetPrimitiveParams([
            PRIM_COLOR, ALL_SIDES, <0,0,0>, 1.0,
            PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_LOW, PRIM_BUMP_NONE,
            PRIM_COLOR, 4, <1,1,1>, 1.0,
            PRIM_BUMP_SHINY, 1, PRIM_SHINY_NONE, PRIM_BUMP_NONE,
            PRIM_BUMP_SHINY, 2, PRIM_SHINY_NONE, PRIM_BUMP_NONE]);

This will turn all sides black, set all sides shiny to low, change side 4 to white, change side 1 and 4 to no shine and white, and change side 2 and 4 to no shine and white. The workaround would be something like this:

llSetPrimitiveParams([
            PRIM_COLOR, ALL_SIDES, <0,0,0>, 1.0,
            PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_LOW, PRIM_BUMP_NONE,
            PRIM_COLOR, 4, <1,1,1>, 1.0,
            PRIM_COLOR, 1, <0,0,0>, 1.0,
            PRIM_BUMP_SHINY, 1, PRIM_SHINY_NONE, PRIM_BUMP_NONE,
            PRIM_COLOR, 2, <0,0,0>, 1.0,
            PRIM_BUMP_SHINY, 2, PRIM_SHINY_NONE, PRIM_BUMP_NONE]);
-- StickMan (2006-03-01 03:39:34)
I've just discovered that in the 1.9.1 (10) preview, PRIM_FLEXIBLE true/false sets the Flexible path option... haven't yet figured out how to set softness, tension, drag, gravity, wind, light, etc. yet tho.
-- GistyaEusebio (2006-04-16 14:16:00)
Leave PRIM_FLEXIBLE alone, BW. Yadweb Linden already alluded to its syntax here. I'm simply adding it now (with appropriate "unimplemented" notes), accordingly. Stop being a wiki troll.
-- EepQuirk (2006-04-18 03:13:15)
at the time you added it i hadn't seen the thread, so i thought it was another example of your wishful yerning. Putting it in the comment collor is much better. FYI don't beleive what lindens say when it comes to adding features. Actions speak louder then words.
-- BlindWanderer (2006-04-19 01:58:25)
Stay updated and there won't be a problem, BW...
-- EepQuirk (2006-04-19 22:51:00)
Does PRIM_TEXGEN really exist? If so, what does it do? (The compiler doesn't seem to recognize it for me.)
-- JeremiahSansome (2006-04-30 11:36:02)
PRIM_TEXGEN is a preview flag. It only exists on the preview grid ATM.
-- BlindWanderer (2006-05-01 10:55:26)
I've had problems with updating both textures and colors in the same setparams call. It seems, if you first set different textures for all sides on a cube and then different colors for all sides, the last color to be set will cover the whole cube. Vice versa when order reversed. If I interleave, set texture and color for each side, if works fine.
-- PierreJosephProudhon (2006-05-31 20:49:35)
File a bug report.
-- EepQuirk (2006-06-03 01:05:42)
An interesting glitch with 1.10: The standard building tools require you to increase the value of taper to make the top size smaller, whereas the taper value in llSetPrimitiveParams requires you to decrease it for the same effect.
-- DolusNaumova (2006-06-09 16:25:51)
Bug-report it.
-- EepQuirk (2006-06-09 21:51:14)
Color has already been linked; please don't add any more links to it.
-- EepQuirk (2006-06-11 23:42:04)
A call to llSetPrimitiveParams([PRIM_ROTATION,Rot,PRIM_POSITION,Pos]); gives two delays, when i was expecting only one. It is exactly the same as calling llSetLocalRot() and then llSetPos();

From this wiki page, i understood the script would only be delayed once, but that is not so...
Is this normal or expected behaviour?
-- ARennes-258-1-16-113.w90-12.abo.wanadoo.fr (2007-08-31 05:19:23)
Attach a comment to this page: