Difference between revisions of "PRIM SIZE"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:


{{#vardefine:p_size_desc|ranges from 0.01 to 64.0 for x, y and z}}
{{#vardefine:p_size_desc|ranges from 0.01 to 64.0 for x, y and z}}
TODO: Insert caveat about megaprims and llGetPrimitiveParams (they are bigger than 64m)


}}</onlyinclude>{{#if:
}}</onlyinclude>{{#if:
Line 12: Line 14:
|type=integer
|type=integer
|value=7
|value=7
|desc=Returns or sets the prim's size.  
|desc=Returns or sets the prim's {{LSLP|size}}.
|caveats=
*Does not work on [[STATUS_PHYSICS|physical]] prims.
|pa={{LSL Constant/List|i_front=[&#32;{{#var:size_const}},&#32;|i_end=&nbsp;]
|pa={{LSL Constant/List|i_front=[&#32;{{#var:size_const}},&#32;|i_end=&nbsp;]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
Line 25: Line 29:
}}
}}
|examples=
|examples=
<lsl>//Changing the prim size and rotation
<source lang="lsl2">//Changing the prim size and rotation
default
default
{
{
Line 35: Line 39:
       ]);
       ]);
   }
   }
} </lsl>
} </source>
|constants=
|constants=
|functions=
|functions=

Latest revision as of 16:56, 23 January 2015

Description

Constant: integer PRIM_SIZE = 7;

The integer constant PRIM_SIZE has the value 7

Returns or sets the prim's size.

llSetPrimitiveParams

[ PRIM_SIZE, vector size ]
• vector size ranges from 0.01 to 64.0 for x, y and z

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_SIZE ]);

Returns the list [ vector size ]

• vector size ranges from 0.01 to 64.0 for x, y and z

Caveats

Related Articles

Examples

//Changing the prim size and rotation
default
{
  touch_start(integer total_number)
  {
    llSetPrimitiveParams([
        PRIM_SIZE, <0.25,0.5,1.0>,
        PRIM_ROTATION, <1.0, 0.0, 0.0, 0.0>
      ]);
  }
}

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_SIZE = 7;