Difference between revisions of "LlGetDisplayName"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
Kelly Linden (talk | contribs) (Created page with '{{LSL_Function |func_id=NNN|func_sleep=0.0|func_energy=10.0 |sort=GetDisplayName|func=llGetDisplayName |return_type=string|p1_type=key|p1_name=id |func_footnote='''id''' must spe...') |
Kelly Linden (talk | contribs) |
||
Line 1: | Line 1: | ||
{{LSL Generic/pre-release|server-release=DisplayNames}} | |||
{{LSL_Function | {{LSL_Function | ||
|func_id=NNN|func_sleep=0.0|func_energy=10.0 | |func_id=NNN|func_sleep=0.0|func_energy=10.0 |
Revision as of 16:01, 20 August 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llGetDisplayName( key id );NNN | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is the non-unique display name of the avatar specified by id.
• key | id |
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 display name 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 llRequestDisplayName function and the dataserver event to obtain the avatar's display name from a key.
- There is no opposite function (llDisplayName2Key) available since display names are non-unique
Examples
<lsl>// Best viewed in Chat History (ctrl-h) default {
collision_start(integer a)//Announce who collided { llSay(0, "llGetDisplayName: " + llGetDisplayName(llDetectedKey(0)) + "\nllDetectedName: " + llDetectedName(0)); } touch_start(integer a) { llSay(0,"llGetDisplayName: " + llGetDisplayName(llDetectedKey(0)) + "\nllDetectedName: " + llDetectedName(0)); }}</lsl>
See Also
Functions
• | llGetUsername | |||
• | llRequestDisplayName | – | Uses the dataserver to request avatar information |