OsAvatarType

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|function_syntax=integer osAvatarType(key avatarKey)<br>
 
|function_syntax=integer osAvatarType(key avatarKey)<br>
integer osAvatarType(string avatarFirstName, string AvatarLastName)
+
integer osAvatarType(string avatarFirstName, string avatarLastName)
  
 
|csharp_syntax=
 
|csharp_syntax=

Revision as of 08:27, 21 April 2021

integer osAvatarType(key avatarKey)

integer osAvatarType(string avatarFirstName, string avatarLastName)

Returns the type of a avatar in region:
  • < 0 in case of error
  • 0 if avatar not found in region
  • 1 if it is a normal avatar
  • 2 if it is a NPC
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
// This script listens for a key on channel 1 which will then
// tell you the avatar type
 
default
{
    state_entry()
    {
        llListen(1, "", llGetOwner(), "");    
    }
 
    listen(integer channel , string name, key id, string message)
    {
        if(channel == 1)
        {
            llOwnerSay(osAvatarType((key)message));
        }   
    }
}
Notes
This function was added in 0.9.2.0


Personal tools
General
About This Wiki