OsAddAgentToGroup
From OpenSimulator
(Difference between revisions)
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=None | |threat_level=None | ||
− | |function_syntax= | + | |function_syntax=osAddAgentToGroup(key AgentID, string GroupName, string RequestedRole) |
− | + | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
// | // | ||
− | // | + | // osAddAgentToGroup Script Example |
− | + | ||
− | + | ||
// | // | ||
+ | |||
+ | string GroupToJoin = "Test Group"; | ||
+ | string RoleToJoin = "Everyone"; | ||
default | default | ||
{ | { | ||
− | + | state_entry() | |
{ | { | ||
− | + | llSay(0,"Touch to use osAddAgentToGroup to add yourself to a group"); | |
+ | } | ||
+ | |||
+ | touch_end(integer num) | ||
+ | { | ||
+ | key AgentID = llDetectedKey(0); | ||
+ | osAddAgentToGroup(AgentID, GroupToJoin, RoleToJoin); | ||
} | } | ||
} | } | ||
</source> | </source> | ||
− | + | |description=Prerequisites | |
+ | * The Group must be created | ||
+ | * You must have the Group UUID | ||
+ | * Roles within the group must be defined (default has Everyone & Owners) | ||
| | | | ||
}} | }} |
Revision as of 03:04, 21 November 2020
osAddAgentToGroup(key AgentID, string GroupName, string RequestedRole)
| |
Prerequisites
| |
Threat Level | None |
Permissions | No permissions specified |
Extra Delay | No function delay specified |
Example(s) | |
// // osAddAgentToGroup Script Example // string GroupToJoin = "Test Group"; string RoleToJoin = "Everyone"; default { state_entry() { llSay(0,"Touch to use osAddAgentToGroup to add yourself to a group"); } touch_end(integer num) { key AgentID = llDetectedKey(0); osAddAgentToGroup(AgentID, GroupToJoin, RoleToJoin); } } |