OsAvatarType
From OpenSimulator
(Difference between revisions)
Line 2: | Line 2: | ||
|function_syntax=integer osAvatarType(key avatarKey) | |function_syntax=integer osAvatarType(key avatarKey) | ||
|csharp_syntax= | |csharp_syntax= | ||
− | |description=Returns: | + | |description=Returns a avatar type: |
* < 0 in case of error | * < 0 in case of error | ||
Line 8: | Line 8: | ||
* 1 if it is a normal avatar | * 1 if it is a normal avatar | ||
* 2 if it is a NPC | * 2 if it is a NPC | ||
+ | |||
|threat_level=ignored | |threat_level=ignored | ||
Line 13: | Line 14: | ||
|delay=0 | |delay=0 | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
− | |||
// This script listens for a key on channel 1 which will then | // This script listens for a key on channel 1 which will then | ||
Line 29: | Line 29: | ||
if(channel == 1) | if(channel == 1) | ||
{ | { | ||
− | + | llOwnerSay(osAvatarType((key)message)); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
} | } |
Revision as of 07:03, 21 April 2021
integer osAvatarType(key avatarKey)
| |
Returns a avatar type:
| |
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 if the specified key is an NPC or not. 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 |