Difference between revisions of "LlGetObjectPermMask"
Jump to navigation
Jump to search
Kireji Haiku (talk | contribs) m (removed second example script) |
Kireji Haiku (talk | contribs) m (added PERM_MOVE) |
||
Line 21: | Line 21: | ||
if ((perm & fullPerms) == fullPerms) | if ((perm & fullPerms) == fullPerms) | ||
output += "full | output += "full"; | ||
else if ((perm & copyModPerms) == copyModPerms) | else if ((perm & copyModPerms) == copyModPerms) | ||
output += "copy & modify | output += "copy & modify"; | ||
else if ((perm & copyTransPerms) == copyTransPerms) | else if ((perm & copyTransPerms) == copyTransPerms) | ||
output += "copy & transfer | output += "copy & transfer"; | ||
else if ((perm & modTransPerms) == modTransPerms) | else if ((perm & modTransPerms) == modTransPerms) | ||
output += "modify & transfer | output += "modify & transfer"; | ||
else if ((perm & PERM_COPY) == PERM_COPY) | else if ((perm & PERM_COPY) == PERM_COPY) | ||
output += "copy | output += "copy"; | ||
else if ((perm & PERM_TRANSFER) == PERM_TRANSFER) | else if ((perm & PERM_TRANSFER) == PERM_TRANSFER) | ||
output += "transfer | output += "transfer"; | ||
// remember, neither PERM_MODIFY only nor no perms at all is possible | // remember, neither PERM_MODIFY only nor no perms at all is possible | ||
// items in Second Life either have PERM_COPY or PERM_TRANSFER at least | // items in Second Life either have PERM_COPY or PERM_TRANSFER at least | ||
if ((perm & PERM_MOVE) == PERM_MOVE) output += " and move"; | |||
return | return | ||
Line 57: | Line 59: | ||
llSay(PUBLIC_CHANNEL, "group" + getPermsAsReadableString(groupPerms)); | llSay(PUBLIC_CHANNEL, "group" + getPermsAsReadableString(groupPerms)); | ||
llSay(PUBLIC_CHANNEL, "everyone" + getPermsAsReadableString(everyonePerms)); | llSay(PUBLIC_CHANNEL, "everyone" + getPermsAsReadableString(everyonePerms)); | ||
} | } | ||
} | } |
Revision as of 10:41, 25 November 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetObjectPermMask( integer mask );0.0 | Forced Delay |
10.0 | Energy |
Returns an integer that is the requested permission mask for the root object the task is attached to.
• integer | mask | – | MASK_* flag |
|
|
Examples
<lsl> string getPermsAsReadableString(integer perm) {
integer fullPerms = PERM_COPYNotes
The perms of a newly created object often are Base = PERM_ALL, Owner = PERM_ALL, Next = PERM_MOVE or PERM_TRANSFER, Group = 0 (none), Everyone = 0 (none). The perms2String example describes those perms as "Closed / Yes Transfer".