Skip to content

PRIM TYPE

Looking for the current API? Open the PRIM_TYPE reference →

Wiki description

Gets or sets the type_flag of the prim and associated type type_parameters.

Usage

[ PRIM_TYPE, integer flag ] + flag_parameters

The values needed for type_parameters is dependent on type_flag, please refer to the individual PRIM_TYPE_* articles for additional information.

Caveats

  • PRIM_TYPE can only be used with LINK_SET if the object contains 10 or fewer prims. It can only be used with LINK_ALL_OTHERS or LINK_ALL_CHILDREN if the object contains 11 or fewer prims. If there are more prims, the operation will fail and an error will be shouted to DEBUG_CHANNEL. Work around this by looping through the prims with llSetLinkPrimitiveParamsFast.
  • PRIM_TYPE will silently fail when executed by a script placed inside a mesh, whether the affect object is the mesh or not (in linksets for example), use a normal prim as your root prim.

llGetPrimitiveParams([ PRIM_TYPE ]);

Returns the list [ integer flag
The values that follow after type_flag, the type_parameters, are dependent on the value of flag, please refer to the individual PRIM_TYPE_* articles for further information.
PRIM_TYPE_BOX integer 0 s2=style="text-align: center;"
PRIM_TYPE_CYLINDER integer 1 s2=style="text-align: center;"
PRIM_TYPE_PRISM integer 2 s2=style="text-align: center;"
PRIM_TYPE_SPHERE integer 3 s2=style="text-align: center;"
PRIM_TYPE_TORUS integer 4 s2=style="text-align: center;"
PRIM_TYPE_TUBE integer 5 s2=style="text-align: center;"
PRIM_TYPE_RING integer 6 s2=style="text-align: center;"
PRIM_TYPE_SCULPT integer 7 s2=style="text-align: center;"
flag Constants flag_parameters
[ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
[ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
[ integer hole_shape, vector cut, float hollow, vector twist, vector top_size, vector top_shear ]
[ integer hole_shape, vector cut, float hollow, vector twist, vector dimple]
[ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ]
[ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ]
[ integer hole_shape, vector cut, float hollow, vector twist, vector hole_size, vector top_shear, vector advanced_cut, vector taper, float revolutions, float radius_offset, float skew ]
[ string map, integer type ]
PRIM_HOLE_DEFAULT integer hex=0x00 ihex=0 c=Default m=3
PRIM_HOLE_SQUARE integer hex=0x20 ihex=32 c=Square m=3
PRIM_HOLE_CIRCLE integer hex=0x10 ihex=16 c=Circle m=3
PRIM_HOLE_TRIANGLE integer hex=0x30 ihex=48 c=Triangle m=3
hole_shape Flags Shape hole_shape Flags Shape

See also: constants

See also: functions

See also: events

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:LSL PrimitiveParam Categorize

Original shared helper source (conditional wiki logic is not evaluated)
{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{#ifexist:Template:LSLC{{#var:lang}}|
 {{LSLC{{#var:lang}}|PrimitiveParams}}
 {{LSLC{{#var:lang}}|PrimitiveParams/{{{1}}}}}
 {{LSLC{{#var:lang}}|{{{1}}}}}
|
 {{LSLC|PrimitiveParams{{#var:lang}}}}
 {{LSLC|PrimitiveParams/{{{1}}}{{#var:lang}}}}
 {{LSLC|{{{1}}}{{#var:lang}}}}
}}
}}}}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.