Difference between revisions of "LlSitOnLink"
|Line 1:||Line 1:|
|Line 33:||Line 34:|
Revision as of 13:53, 3 April 2017
|LSL Portal||Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials|
The avatar specified by agent_id is forced to sit on the sit target of the prim indicated by the link parameter. If the specified link is already occupied, the simulator searches down the chain of prims in the link set looking for an available sit target.
Returns an Integer
|• key||agent_id||–||UUID of the avatar being forced to sit|
|• integer||link||–||Link number for the prim containing the desired sit target|
If successful, this method returns 1.
If the function fails, it returns a negative number constant.
Link constants that indicate a single prim may be used for the link parameter. These are LINK_ROOT and LINK_THIS. Other constants such as LINK_SET, LINK_CHILDREN, LINK_ALL_OTHERS will return an INVALID_LINK error.
This method must be called from an experience enabled script running on land that has enabled the experience key. If these conditions are not met this method returns a NOT_EXPERIENCE error.
The targeted avatar must also have accepted the experience. If the user is not participating in the experience this method returns NO_EXPERIENCE_PERMISSION. If the avatar id can not be found or is not over land that has enabled the experience this method returns INVALID_AGENT.
If there are no valid sit targets remaining in the linkset this method returns NO_SIT_TARGET and no action is taken with the avatar.
If the avatar does not have access to the parcel containing the prim running this script, this call fails.
|SIT_NOT_EXPERIENCE||-1||The script is not running as part of an experience with a valid experience key or the experience is not allowed at your location.|
|SIT_NO_EXPERIENCE_PERMISSION||-2||The agent has not granted permission.|
|SIT_NO_SIT_TARGET||-3||Unable to find an open sit target.|
|SIT_INVALID_AGENT||-4||Unable to find specified agent.|
|SIT_INVALID_LINK||-5||Unable to find specified link or the link constant would return multiple prims.|
|SIT_NO_ACCESS||-6||The avatar does not have access to the parcel that the prim running this script is located in.|
|SIT_INVALID_OBJECT||-7||This value is returned if the llSitOnLink is trying to force the user to sit on something that cannot be sat upon (such as an attachment).|