Difference between revisions of "LlRequestPermissions"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|sort=RequestPermissions
|func=llRequestPermissions|sort=RequestPermissions
|func_id=136
|func_id=136|func_sleep=0.0|func_energy=10.0
|func_sleep=0.0
|func_energy=10.0
|func=llRequestPermissions
|p1_type=key|p1_name=agent|p1_desc=Avatar key
|p1_type=key|p1_name=agent|p1_desc=Avatar key
|p2_type=integer|p2_name=perm|p2_desc=Permission mask (bitfield containing the permissions to request).
|p2_type=integer|p2_name=perm|p2_desc=Permission mask (bitfield containing the permissions to request).
Line 26: Line 23:
|constants={{LSL Constants/Permissions}}
|constants={{LSL Constants/Permissions}}
|cat1=Permissions/Script
|cat1=Permissions/Script
|cat2
|cat2=Dialog
|cat3
|cat3
|cat4
|cat4

Revision as of 11:56, 24 February 2007

Summary

Function: llRequestPermissions( key agent, integer perm );

Ask agent for permission to run certain classes of functions.

• key agent Avatar key
• integer perm Permission mask (bitfield containing the permissions to request).

Constants Action Category Granter Automatically granted when…
PERMISSION_DEBIT 0x2 take money from agent's account Money Owner
PERMISSION_TAKE_CONTROLS 0x4 take agent's controls Control Anyone sat on, attached
PERMISSION_TRIGGER_ANIMATION 0x10 start or stop Animations on agent Animation Anyone sat on, attached
PERMISSION_ATTACH 0x20 attach/detach from agent Attachment Owner or Anyone attached
PERMISSION_CHANGE_LINKS 0x80 change links Link Owner
PERMISSION_TRACK_CAMERA 0x400 track the agent's camera position and rotation Camera Anyone sat on, attached
PERMISSION_CONTROL_CAMERA 0x800 control the agent's camera
(must be sat on or attached; automatically revoked on stand or detach)
Camera Anyone sat on, attached
PERMISSION_TELEPORT 0x1000 teleport the agent Teleport Anyone[1]
PERMISSION_SILENT_ESTATE_MANAGEMENT 0x4000 manage estate access without notifying the owner of changes Estate Owner
PERMISSION_OVERRIDE_ANIMATIONS 0x8000 configure the overriding of default animations on agent Animation Anyone attached
PERMISSION_RETURN_OBJECTS 0x10000 Used by llReturnObjectsByOwner and llReturnObjectsByID to return objects from parcels Cleanup Owner, Group Owner

Caveats

  • Permissions do not accumulate.
    • If a permission was requested with a previous call to this function and granted, then in subsequent call was not requested, that permission is released (lost).
  • Scripts may hold permissions for only one agent at a time. To hold permissions for multiple agents you must use more then one script.
All Issues ~ Search JIRA for related Bugs

Examples

Notes

A dialog is presented to the agent to grant these permissions except for a few cases:

  • If agent is sitting on object - Control and Camera tracking permissions are granted without notification upon request.
  • If object is attached to agent - Control and Attach permissions are granted without notification upon request.

Regardless if a dialog is displayed you should always use the run_time_permissions event instead of depending upon this quirk.

See Also

Events

•  run_time_permissions Permission receiver event

Functions

•  llGetPermissions Get the permissions granted
•  llGetPermissionsKey Get the avatar who granted permissions.

Articles

•  Script permissions

Deep Notes

Search JIRA for related Issues

Footnotes

Signature

function void llRequestPermissions( key agent, integer perm );