Skip to content

PRIM_TYPE

constant
Constant
integer PRIM_TYPE = 9;
Set with llSetLinkPrimitiveParamsFast
PRIM_TYPE, integer value
Get with llGetLinkPrimitiveParams, llGetPrimitiveParams
PRIM_TYPE → integer value
  1. integer value// Followed by the arguments of that form. Values: PrimType

Prim parameter used to get or set the geometric shape type (PRIM_TYPE_*) and its associated parameters.

Other PrimParam values (42)
Other PrimParamGet values (40)

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

[ PRIM_TYPE, integer flag ] + flag_parameters
  • integer flag — PRIM_TYPE_* flag

Used with llSetPrimitiveParams & llSetLinkPrimitiveParams.

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

  • 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.
llGetLinkPrimitiveParams(LINK_THIS, [ PRIM_TYPE ]);

Returns the same values, in the same order.

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.

ConstantTypeValueDescription
PRIM_TYPE_BOXinteger0
PRIM_TYPE_CYLINDERinteger1
PRIM_TYPE_PRISMinteger2
PRIM_TYPE_SPHEREinteger3
PRIM_TYPE_TORUSinteger4
PRIM_TYPE_TUBEinteger5
PRIM_TYPE_RINGinteger6
PRIM_TYPE_SCULPTinteger7
flag Constantsflag_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 ]
From the LSL definitions: PrimTypeHole
integer PRIM_HOLE_DEFAULT = 0x00;  // Parameter used with certain PRIM_TYPE_* flags to make a hole of the same shape as the outer shape via the hole_shape parameterinteger PRIM_HOLE_CIRCLE = 0x10;  // Parameter used with certain PRIM_TYPE_* flags to make a circular hole via the hole_shape parameterinteger PRIM_HOLE_SQUARE = 0x20;  // Parameter used with certain PRIM_TYPE_* flags to make a squarish hole via the hole_shape parameterinteger PRIM_HOLE_TRIANGLE = 0x30;  // Parameter used with certain PRIM_TYPE_* flags to make a triangular hole via the hole_shape parameter
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.