OsAddAgentToGroup

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Undo revision 49872 by Manni (talk))
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|threat_level=None
 
|threat_level=None
|function_syntax=osAgentSaveAppearance(key agentId, string notecard)
+
|function_syntax=osAddAgentToGroup(key AgentID, string GroupName, string RequestedRole)
|function_syntax=osAgentSaveAppearance(key agentId, string notecard, integer includeHuds)  
+
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
//
 
//
// osAgentSaveAppearance Script Example
+
// osAddAgentToGroup Script Example
// GPLv3 license attributed to the Wizardry and Steamworks group at http://was.fm/opensim:npc
+
// touch to save your XML to a notecard named appearance for use with NPC follower and NPC puppeteer script.
+
 
//
 
//
 +
 +
string GroupToJoin = "Test Group";
 +
string RoleToJoin = "Everyone";
  
 
default
 
default
 
{
 
{
     touch_start(integer num)
+
     state_entry()
 
     {
 
     {
         osAgentSaveAppearance(llDetectedKey(0), "appearance");
+
         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 04:04, 21 November 2020

osAddAgentToGroup(key AgentID, string GroupName, string RequestedRole)
Prerequisites
  • The Group must be created
  • You must have the Group UUID
  • Roles within the group must be defined (default has Everyone & Owners)
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);
    }
}
Personal tools
General
About This Wiki