Difference between revisions of "PRIM SIZE"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{#if: {{LSL_Constants/PrimitiveParams}} }}{{LSL Constant |name=PRIM_SIZE |type=integer |value=7 |desc=Returns or sets the prim's size. |pa= |text= |pb= |examples |constants= |functions= ...)
 
m (<lsl> tag to <source>)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#if:
<onlyinclude>{{#if:
{{LSL_Constants/PrimitiveParams}}
 
{{#vardefine:size_const|{{LSL Const|PRIM_SIZE|integer|7|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's size}}}}
 
{{#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:
 
}}{{LSL Constant
}}{{LSL Constant
|inject-2={{LSL PrimitiveParam Categorize|Prim}}
|name=PRIM_SIZE
|name=PRIM_SIZE
|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}}.
|pa=
|caveats=
|text=
*Does not work on [[STATUS_PHYSICS|physical]] prims.
|pb=
|pa={{LSL Constant/List|i_front=[&#32;{{#var:size_const}},&#32;|i_end=&nbsp;]
|examples
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
|i1_type=vector|i1_name=size
|toc=llSetPrimitiveParams
}}
|pb={{LSL Constant/List|i_front=[[llGetPrimitiveParams]]([&nbsp;{{#var:size_const}}|i_end=&nbsp;]);|
|r_front=Returns the list [&nbsp;|r_end=&nbsp;]
|text
|r1_type=vector|r1_name=size
|toc=llGetPrimitiveParams
}}
|examples=
<source lang="lsl2">//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>
      ]);
  }
} </source>
|constants=
|constants=
|functions=
|functions=
Line 15: Line 45:
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}
{{LSL DefineRow||[[llSetLinkPrimitiveParams]]|}}
{{LSL DefineRow||[[llGetScale]]|}}
{{LSL DefineRow||[[llSetScale]]|}}
|events=
|events=
|location
|location
|cat1=Prim
|cat1
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

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;