llGetPermissions
function
Function syntax
integer llGetPermissions();- Returns
integer- Energy
- 10
Returns an integer bitfield representing the permissions (PERMISSION_*) currently granted to the script.
Returns an integer bitfield with the script permissions granted
integer result = llGetPermissions();Specification
Section titled “Specification”| 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 | Anyone1 | |
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 | |
PERMISSION_PRIVILEGED_LAND_ACCESS | 0x80000 | Grants the script privileged access to land parcel functions, such as parcel sale. Used by llSetParcelForSale. | Land | Owner | |
PERMISSION_GAME_CONTROL | 0x100000 | Permission to receive game_control input events. | Control | Anyone | sat on, attached |
Examples
Section titled “Examples”Example 1
15 collapsed lines
default{ state_entry() { llRequestPermissions(llGetOwner(), //Comment out any of the following lines for fun PERMISSION_DEBIT | PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH | PERMISSION_CHANGE_LINKS | PERMISSION_TRACK_CAMERA | PERMISSION_CONTROL_CAMERA | 0); } touch_start(integer a) { integer perm = llGetPermissions(); if(perm & PERMISSION_DEBIT) llOwnerSay("Can use llGiveMoney");31 collapsed lines
if(perm & PERMISSION_TAKE_CONTROLS) llOwnerSay("Can use llTakeControls"); if(perm & PERMISSION_TRIGGER_ANIMATION) llOwnerSay("Can use llStartAnimation"); if(perm & PERMISSION_ATTACH) llOwnerSay("Can use llAttachToAvatar"); if(perm & PERMISSION_CHANGE_LINKS) llOwnerSay("Can use llCreateLink"); if(perm & PERMISSION_TRACK_CAMERA) llOwnerSay("Can use llGetCameraPos"); if(perm & PERMISSION_CONTROL_CAMERA) llOwnerSay("Can use llSetCameraParams"); } run_time_permissions(integer perm) { if(perm & PERMISSION_DEBIT) llOwnerSay("Can use llGiveMoney"); if(perm & PERMISSION_TAKE_CONTROLS) llOwnerSay("Can use llTakeControlls"); if(perm & PERMISSION_TRIGGER_ANIMATION) llOwnerSay("Can use llStartAnimation"); if(perm & PERMISSION_ATTACH) llOwnerSay("Can use llAttachToAvatar"); if(perm & PERMISSION_CHANGE_LINKS) llOwnerSay("Can use llCreateLink"); if(perm & PERMISSION_TRACK_CAMERA) llOwnerSay("Can use llGetCameraPos"); if(perm & PERMISSION_CONTROL_CAMERA) llOwnerSay("Can use llSetCameraParams"); }}See also
Section titled “See also”Functions
Section titled “Functions”llGetPermissionsKey— Get the avatar who granted permissions.llRequestPermissions— Request permissions
Events
Section titled “Events”run_time_permissions— Permission receiver event
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.
Footnotes
Section titled “Footnotes”-
PERMISSION_TELEPORTcannot be held by temporary attachments. ↩