PRIM_LINK_TARGET
integer PRIM_LINK_TARGET = 34;llSetLinkPrimitiveParamsFastPRIM_LINK_TARGET, integer link_targetinteger link_target// Values: Links
Prim parameter [PRIM_LINK_TARGET, integer link_target] used to get or set properties for multiple linked prims within a single primitive parameters call.
Other PrimParam values (42)
PRIM_ALLOW_UNSIT39PRIM_ALPHA_MODE38PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_OMEGA32PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_PROJECTOR42PRIM_REFLECTION_PROBE44PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
Used to get or set multiple links with a single PrimParameters call.
llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_LINK_TARGET, integer link_target ]);- integer link_target
The same syntax applies to llSetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast but with an additional prefixed link parameter in the function call.
llGetLinkPrimitiveParams(LINK_THIS, [ PRIM_LINK_TARGET, integer link_target ]);Returns the same values, in the same order.
The same syntax applies to llGetLinkPrimitiveParams, but with an additional prefixed link parameter in the function call.
Caveats
Section titled “Caveats”- If
PRIM_LINK_TARGET’s link_target describes a seated avatar…- Flags not explicitly mentioned have obvious values.
PRIM_NAMEwill return the avatar’s legacy name.PRIM_DESCwill return"".PRIM_TYPEwill return[PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, <0., 1., 0.>, 0., ZERO_VECTOR, <1., 1., 0.>, ZERO_VECTOR]PRIM_SLICEwill return[<0., 1., 0.>]PRIM_MATERIALwill returnPRIM_MATERIAL_FLESH.PRIM_TEMP_ON_REZwill returnFALSE.PRIM_PHANTOMwill returnFALSE.PRIM_SIZEwill returnllGetAgentSize(llGetLinkKey(link)).PRIM_TEXTwill return["", ZERO_VECTOR, 1.].PRIM_POINT_LIGHTwill return[FALSE, ZERO_VECTOR, 0., 0., 0.].PRIM_FLEXIBLEwill return[FALSE, 0, 0., 0., 0., 0., ZERO_VECTOR].PRIM_COLOR,PRIM_TEXTURE,PRIM_GLOW,PRIM_FULLBRIGHT,PRIM_BUMP_SHINY,PRIM_TEXGEN- will return
[]and report a script error to the owner: “texture info cannot be accessed for avatars.”
- will return
Examples
Section titled “Examples”Example 1
5 collapsed lines
default{ touch_start(integer num_detected) { // color the root prim red and the first linked-prim green llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.0>, (float)TRUE, PRIM_LINK_TARGET, 2, PRIM_COLOR, ALL_SIDES, <0.0, 1.0, 0.0>, (float)TRUE]);
7 collapsed lines
// instead of: // llSetLinkPrimitiveParamsFast(LINK_ROOT, // [PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.0>, (float)TRUE]); // llSetLinkPrimitiveParamsFast(2, // [PRIM_COLOR, ALL_SIDES, <0.0, 1.0, 0.0>, (float)TRUE]); }}Example 2
21 collapsed lines
// assume that you have a global list "gPanels" loaded with the link numbers of prims// named "panel" and that the global integer parameter "gON" has been defined ....
touch_start(integer num) { // basic on/off switch gON = !gON;
// conditions which will change on touch // white panel list WhichWay = [PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, (float)TRUE];
if (gON)// red panel WhichWay = [PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.0>, (float)TRUE];
// to accumulate the parameter list that will be affected by SLPPF in this event list params; integer numberOfPrims = llGetNumberOfPrims();
// Links in a linkset start numbering with 1 integer index = 1; do { // build the parameters list, in the format PRIM_LINK_TARGET, link number, parameters params += [PRIM_LINK_TARGET, llList2Integer(gPanels, index)] + WhichWay; } while (++index < numberOfPrims);
// apply the parameters to all "panel" prims llSetLinkPrimitiveParamsFast(LINK_SET, params); }See also
Section titled “See also”Functions
Section titled “Functions”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.