llCreateLink

From Second Life Wiki
Revision as of 13:57, 16 April 2008 by Strife Onizuka (talk | contribs) (grammer)
Jump to navigation Jump to search

Summary

Function: llCreateLink( key target, integer parent );
1.0 Forced Delay
10.0 Energy

Attempt to link the script's object with target.

• key target A prim in the same region.
• integer parent If FALSE, then target becomes the root. If TRUE, then the script's object becomes the root.

To run this function the script must request the PERMISSION_CHANGE_LINKS permission with llRequestPermissions and it must be granted by the owner. target must be modifiable and have the same owner.
This object must also be modifiable.

Specification

The prims for the child object (target if parent is TRUE, script's object if parent is FALSE) are inserted into the parent object's link set starting at link number 2. For example, if the link order for the parent object is A1, A2, A3 and the link order of the child object is B1, B2, B3, then the link order of the resulting object will be A1, B1, B2, B3, A2, A3.

Caveats

  • This function causes the script to sleep for 1.0 seconds.
Permissions
  • If target is not in the region or an object, an error is shouted on DEBUG_CHANNEL.
  • If either the object or the target are not modifiable or of different owners, then an error is shouted on DEBUG_CHANNEL.
  • The maximum distance between linkable objects depends on the size of the objects are explained here: Linkability Rules

Examples

See Also

Events

•  run_time_permissions Permission receiving event

Functions

•  llGetPermissions Get the permissions granted
•  llGetPermissionsKey Get the agent who granted permissions
•  llRequestPermissions Request permissions
•  llBreakLink Break a link
•  llBreakAllLinks Break all links

Articles

•  Script permissions
•  Linkability Rules

Deep Notes

Signature

function void llCreateLink( key target, integer parent );