OsNpcSetProfileImage

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Change See Also)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|threat_level=Low
 
|threat_level=Low
|function_syntax=osNpcSetProfileImage(LSL_Key npc, string image)
+
|permissions=${OSSL|osslNPC}
 +
|function_syntax=osNpcSetProfileImage(key npc, string image)
 +
|description=Set image in created NPC's profile.
 +
One can use UUID of the texture or name of texture included in prim's inventory.<br />
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
//
 
//
// osNpcSetProfileImage Exemple
+
// osNpcSetProfileImage Example
 +
// Author: djphil
 
//
 
//
  
Line 36: Line 40:
 
}
 
}
 
</source>
 
</source>
|description=Set image in created NPC's profile.
+
|additional_info=
 
+
One can use UUID of the texture or name of texture included in prim's inventory.<br />
+
 
+
See also [[OsNpcSetProfileAbout]].
+
|
+
 
}}
 
}}
 +
== See Also ==
 +
* [[osNpcSetProfileAbout]]
 +
* [[osNpcSetProfileImage]]

Latest revision as of 18:53, 5 December 2020

osNpcSetProfileImage(key npc, string image)
Set image in created NPC's profile.

One can use UUID of the texture or name of texture included in prim's inventory.

Threat Level Low
Permissions ${OSSL|osslNPC}
Extra Delay No function delay specified
Example(s)
//
// osNpcSetProfileImage Example
// Author: djphil
//
 
key npc = NULL_KEY;
string image = "My Photo";
 
default
{
    touch_start(integer number)
    {
        if (npc == NULL_KEY)
        {
            osOwnerSaveAppearance("MyClone");
            llSetTimerEvent(2.0);
        }
 
        else
        {
            osNpcRemove(npc);
            npc = NULL_KEY;
            llRemoveInventory("MyClone");
        }
    }
 
    timer()
    {
        llSetTimerEvent(0.0);
        npc = osNpcCreate("John", "Smith", llGetPos() + <0.0, 0.0, 2.0>, "MyClone");
        osNpcSetProfileImage(npc, image);
    }
}


[edit] See Also

Personal tools
General
About This Wiki