LlGetObjectPermMask: Difference between revisions
Jump to navigation
Jump to search
Kireji Haiku (talk | contribs) m added PERM_MOVE |
Kireji Haiku (talk | contribs) m added some very short examples |
||
Line 10: | Line 10: | ||
|constants={{LSL Constants Perm Mask}} | |constants={{LSL Constants Perm Mask}} | ||
|examples= | |examples= | ||
<lsl> | |||
if ((permsYouHave & permsYouWant) == permsYouWant) | |||
llSay(PUBLIC_CHANNEL, "You have the perms you want."); | |||
else | |||
llSay(PUBLIC_CHANNEL, "You don't have the perms you want."); | |||
</lsl> | |||
<lsl> | |||
integer ownerPerms = llGetObjectPermMask(MASK_OWNER); | |||
integer copyAndModPerms = PERM_COPY | PERM_MODIFY; | |||
if ((ownerPerms & copyAndModPerms) == copyAndModPerms) | |||
llSay(PUBLIC_CHANNEL, "Owner has copy & modify perms."); | |||
else | |||
llSay(PUBLIC_CHANNEL, "Owner does not have copy & modify perms."); | |||
</lsl> | |||
<lsl> | <lsl> | ||
string getPermsAsReadableString(integer perm) | string getPermsAsReadableString(integer perm) |
Revision as of 12:25, 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> if ((permsYouHave & permsYouWant) == permsYouWant)
llSay(PUBLIC_CHANNEL, "You have the perms you want.");
else
llSay(PUBLIC_CHANNEL, "You don't have the perms you want.");
</lsl> <lsl> integer ownerPerms = llGetObjectPermMask(MASK_OWNER);
integer copyAndModPerms = 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".