Difference between revisions of "LlSit"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with '{{LSL_Function |func_id|mode=request |func_sleep=0.1 |func_energy=10.0 |func=llSit |sort=Sit |p1_type=key|p1_name=avatar |p2_type=key|p2_name=object |func_desc=Attempts to force ...')
 
m (Replaced <lsl> with <syntaxhighlight>)
 
Line 13: Line 13:
* This function will fail if <code>object</code> is not a valid object for an avatar to sit upon, such as an attachment (see {{jira|SVC-6100}}), or if <code>object</code> is not in the current region (or near its edges).
* This function will fail if <code>object</code> is not a valid object for an avatar to sit upon, such as an attachment (see {{jira|SVC-6100}}), or if <code>object</code> is not in the current region (or near its edges).
* This function may fail if <code>object</code> does not have a [[LlSitTarget|sit target]] defined.
* This function may fail if <code>object</code> does not have a [[LlSitTarget|sit target]] defined.
|examples=<lsl>default {
|examples=<syntaxhighlight lang="lsl2">default {
     touch_start(integer x) {
     touch_start(integer x) {
         if (llDetectedType(0) & AGENT)  
         if (llDetectedType(0) & AGENT)  
Line 22: Line 22:
             llSit(llGetPermissionsKey(), llGetKey()); // Make avatar sit on this object
             llSit(llGetPermissionsKey(), llGetKey()); // Make avatar sit on this object
     }
     }
}</lsl>
}</syntaxhighlight>
|helpers
|helpers
|related
|related

Latest revision as of 14:05, 23 April 2022

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llSit( key avatar, key object );
REQUEST Function ID
0.1 Forced Delay
10.0 Energy

Attempts to force avatar to sit on object.

• key avatar
• key object

Caveats

  • This function causes the script to sleep for 0.1 seconds.
  • This function requires PERMISSION_TRIGGER_SIT to be granted, this permission is auto-granted when requested for an avatar wearing or sat upon the scripted object. Do not rely on the auto-grant feature of the permission, instead always make proper use of the run_time_permissions() event.
  • This function will fail if object is not a valid object for an avatar to sit upon, such as an attachment (see SVC-6100), or if object is not in the current region (or near its edges).
  • This function may fail if object does not have a sit target defined.
All Issues ~ Search JIRA for related Bugs

Examples

default {
    touch_start(integer x) {
        if (llDetectedType(0) & AGENT) 
            llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_SIT);
    }
    run_time_permissions(integer perms) {
        if (perms & PERMISSION_TRIGGER_SIT) 
            llSit(llGetPermissionsKey(), llGetKey()); // Make avatar sit on this object
    }
}

Notes

  • See SVC-924 for the JIRA listing for this function.

Deep Notes

Search JIRA for related Issues

Signature

//function void llSit( key avatar, key object );