OsAgentSaveAppearance

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Script change)
Line 13: Line 13:
 
//
 
//
 
// osAgentSaveAppearance Script Example
 
// osAgentSaveAppearance 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.
 
 
//
 
//
+
 
 
default
 
default
 
{
 
{
     touch_start(integer num)
+
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see osAgentSaveAppearance usage.");
 +
    }
 +
 
 +
     touch_start(integer number)  
 
     {
 
     {
 
         osAgentSaveAppearance(llDetectedKey(0), "appearance");
 
         osAgentSaveAppearance(llDetectedKey(0), "appearance");

Revision as of 12:47, 24 November 2020

key osAgentSaveAppearance(key agentId, string notecard)

key osAgentSaveAppearance(key agentId, string notecard, integer includeHuds)

Save an arbitrary avatar's appearance to a notecard in the prim's inventory. This includes body part data, clothing items and attachments. If a notecard with the same name already exists then it is replaced. The avatar must be present in the region when this function is invoked. The baked textures for the avatar (necessary to recreate appearance on the NPC) are saved permanently.

The first variant will include HUDs, the second variant allows control that. incluceHuds 1 (TRUE) will include 0(FALSE) will not

Threat Level VeryHigh
Permissions ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
//
// osAgentSaveAppearance Script Example
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osAgentSaveAppearance usage.");
    }
 
    touch_start(integer number) 
    {
        osAgentSaveAppearance(llDetectedKey(0), "appearance");
    }
}
Notes
This function was added in 0.7.2-post-fixes, huds control added in 0.9.2
Personal tools
General
About This Wiki