Ask agent for permissions to run certain classes of functions.

Syntax

void llRequestPermissions( key agent, integer permissions );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

key agent
avatar UUID that is in the same region
integer permissions
Permission mask (bitfield containing the permissions to request).

Script execution continues without waiting for a response. When a response is given, a run_time_permissions event is put in the event queue.

Constants

ConstantsActionCategoryGranterAutomatically granted when…
PERMISSION_DEBIT0x2take money from agent's accountMoneyOwner
PERMISSION_TAKE_CONTROLS0x4take agent's controlsControlAnyonesat on, attached
PERMISSION_TRIGGER_ANIMATION0x10start or stop Animations on agentAnimationAnyonesat on, attached
PERMISSION_ATTACH0x20attach/detach from agentAttachmentOwner or Anyoneattached
PERMISSION_CHANGE_LINKS0x80change linksLinkOwner
PERMISSION_TRACK_CAMERA0x400track the agent's camera position and rotationCameraAnyonesat on, attached
PERMISSION_CONTROL_CAMERA0x800control the agent's camera
(must be sat on or attached; automatically revoked on stand or detach)
CameraAnyonesat on, attached
PERMISSION_TELEPORT0x1000teleport the agentTeleportAnyone[1]
PERMISSION_SILENT_ESTATE_MANAGEMENT0x4000manage estate access without notifying the owner of changesEstateOwner
PERMISSION_OVERRIDE_ANIMATIONS0x8000configure the overriding of default animations on agentAnimationAnyoneattached
PERMISSION_RETURN_OBJECTS0x10000Used by llReturnObjectsByOwner and llReturnObjectsByID to return objects from parcelsCleanupOwner, Group Owner
PERMISSION_PRIVILEGED_LAND_ACCESS0x80000Grants the script privileged access to land parcel functions, such as parcel sale. Used by llSetParcelForSale.LandOwner

Caveats

Examples

Request permission to animate an avatar

default
{
    touch_start(integer detected)
    {
        llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
    }
    run_time_permissions(integer perm)
    {
        if (perm & PERMISSION_TRIGGER_ANIMATION)
        {
            llStartAnimation("sit");
            llOwnerSay("animation will end in 5 seconds");
            llSetTimerEvent(5.0);
        }
    }
    timer()
    {
        llSetTimerEvent(0.0);
        llStopAnimation("sit");
    }
}

To request two (or more) permissions at the same time, use the bitwise OR (|) operator.

llRequestPermissions(AvatarID, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION);
- or -
integer perms = PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION;
llRequestPermissions(AvatarID, perms);

Notes

When an agent grants a script non-automatic permissions they will receive a notification (in chat) of

If the script that holds the permissions is in a child prim the name will be that of the child prim (not the object (root)) and position will be its local position (relative to its root).

See also

Events

Functions

Articles

Deep notes

Issues

Footnotes

  1. PERMISSION_TELEPORT cannot be held by temporary attachments.