Difference between revisions of "LlGetUsername"
m (create a link for "username") |
|||
Line 6: | Line 6: | ||
|func_footnote='''id''' must specify a valid avatar key, present in or otherwise known to the sim in which the script is running, otherwise an empty string is returned. This function will still return a valid username if the avatar is a child agent of the sim (i.e., in an adjacent sim, but presently able to see into the one the script is in), or for a short period after the avatar leaves the sim (specifically, when the client completely disconnects from the sim, either as a main or child agent). | |func_footnote='''id''' must specify a valid avatar key, present in or otherwise known to the sim in which the script is running, otherwise an empty string is returned. This function will still return a valid username if the avatar is a child agent of the sim (i.e., in an adjacent sim, but presently able to see into the one the script is in), or for a short period after the avatar leaves the sim (specifically, when the client completely disconnects from the sim, either as a main or child agent). | ||
|func_desc | |func_desc | ||
|return_text=that is the unique username of the avatar specified by '''id'''. | |return_text=that is the unique [[Usernames|username]] of the avatar specified by '''id'''. | ||
|spec | |spec | ||
|caveats=* To get around the "avatar must be present" limitation, you can use the [[llRequestUsername]] function and the [[dataserver]] event to obtain the avatar's username from a key. | |caveats=* To get around the "avatar must be present" limitation, you can use the [[llRequestUsername]] function and the [[dataserver]] event to obtain the avatar's username from a key. |
Revision as of 15:18, 8 November 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Pre-release Documentation Warning! | |
This function is not available yet. This documentation was written prior to its final release so it may not match the final implementation.It is slated for release in Server DisplayNames. |
Summary
Function: string llGetUsername( key id );NNN | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is the unique username of the avatar specified by id.
• key | id | – | avatar UUID that is in the same region |
id must specify a valid avatar key, present in or otherwise known to the sim in which the script is running, otherwise an empty string is returned. This function will still return a valid username if the avatar is a child agent of the sim (i.e., in an adjacent sim, but presently able to see into the one the script is in), or for a short period after the avatar leaves the sim (specifically, when the client completely disconnects from the sim, either as a main or child agent).
Caveats
- To get around the "avatar must be present" limitation, you can use the llRequestUsername function and the dataserver event to obtain the avatar's username from a key.
- There is no opposite function (llUsername2Key) available.
- Display Name changes may take up to 72 hours to propagate. During this time scripts may report the old display name.
Examples
<lsl>// Best viewed in Chat History (ctrl-h) default {
collision_start(integer a)//Announce who collided { llSay(0, "llGetDisplayName: " + llGetDisplayName(llDetectedKey(0)) + "\nllGetUsername: " + llGetUsername(llDetectedKey(0))); } touch_start(integer a) { llSay(0,"llGetDisplayName: " + llGetDisplayName(llDetectedKey(0)) + "\nllGetUsername: " + llGetUsername(llDetectedKey(0))); }}</lsl>
See Also
Functions
• | llGetDisplayName | |||
• | llRequestUsername | – | Uses the dataserver to request avatar information |