OsGetLinkNumber

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{osslfunc |threat_level= |function_syntax= |csharp_syntax= |ossl_example=<source lang="lsl"> // Example of osGetLinkNumber default { state_entry() { ... ...")
 
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|threat_level=
+
|threat_level=None
|function_syntax=
+
|function_syntax=integer osGetLinkNumber(string name)
|csharp_syntax=
+
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
// Example of osGetLinkNumber
 
// Example of osGetLinkNumber
 +
 +
string object_name = "Change Me!";
  
 
default
 
default
Line 10: Line 11:
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         ...
+
         integer link_number = osGetLinkNumber(object_name);
 +
        llOwnerSay(llGetLinkName(link_number));
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
|description=...
+
|description=returns the link number of the prim or sitting avatar with name "name" on the link set or -1 if the name is not found.
|
+
* if names are not unique, the one with lower link number should be return
}}
+
* names "Object" and "Primitive" are ignored
 +
|additional_info=This function was added in 0.9.0.1}}

Latest revision as of 10:03, 7 December 2018

integer osGetLinkNumber(string name)
returns the link number of the prim or sitting avatar with name "name" on the link set or -1 if the name is not found.
  • if names are not unique, the one with lower link number should be return
  • names "Object" and "Primitive" are ignored
Threat Level None
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
// Example of osGetLinkNumber
 
string object_name = "Change Me!";
 
default
{
    state_entry()
    {
        integer link_number = osGetLinkNumber(object_name);
        llOwnerSay(llGetLinkName(link_number));
    }
}
Notes
This function was added in 0.9.0.1
Personal tools
General
About This Wiki