llRequestDisplayName
key llRequestDisplayName(key id// UUID of the avatar to query.
);- Returns
key- Energy
- 10
Requests the Display Name of the agent identified by id. When the Display Name is available the dataserver event will be raised. The agent identified by id does not need to be in the same region or online at the time of the request.
key result = llRequestDisplayName(NULL_KEY);Caveats
Section titled “Caveats”-
If the request fails for any reason, there will be no error notice or dataserver event. You may use a timer to check for stale requests.
-
If you merely wish to show the agent display name in the viewer window, it may be more straightforward to use Viewer URI Name Space and avoid a dataserver event, e.g.:
llSay(0, "secondlife:///app/agent/" + (string)id + "/displayname");
Examples
Section titled “Examples”Example 1
7 collapsed lines
key owner_key;key owner_name_query;string owner_display_name;
default{ state_entry() { owner_key = llGetOwner(); owner_name_query = llRequestDisplayName(owner_key); } dataserver(key queryid, string data)8 collapsed lines
{ if ( owner_name_query == queryid ) { owner_display_name = data; llSay(0, "The display name of the owner of this script : " + owner_display_name ); } }}See also
Section titled “See also”Functions
Section titled “Functions”Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.