Difference between revisions of "Category:LSL Avatar/Name"
(clarification on default Display Naming or modern and legacy accounts) |
|||
Line 12: | Line 12: | ||
! {{Hl2}} | {{LSLGC|Detected|detected}} events | ! {{Hl2}} | {{LSLGC|Detected|detected}} events | ||
|- | |- | ||
! {{Hl2}} | {{LSLGC|Display Name | ! {{Hl2}} | {{LSLGC|Display Name}} | ||
| The name that is displayed on the screen. | | The name that is displayed on the screen. | ||
| No | | No | ||
| [[llGetDisplayName]] | | [[llGetDisplayName]] | ||
| [[llRequestDisplayName]] | | [[llRequestDisplayName]] | ||
| [[ | | [[Display Names/LSL#What about an AGENT_BY_DISPLAY_NAME flag for llSensor?|N/A]] | ||
| {{HoverText| | | {{HoverText|N/A|Use llGetDisplayName in conjunction with llDetectedKey.}} | ||
|- | |- | ||
! {{Hl2}} | {{LSLGC|Username | ! {{Hl2}} | {{LSLGC|Username}} | ||
| The name the users logs in with. | | The name the users logs in with. | ||
| Yes | | Yes | ||
Line 26: | Line 26: | ||
| [[llRequestUsername]] | | [[llRequestUsername]] | ||
| [[AGENT_BY_USERNAME]] | | [[AGENT_BY_USERNAME]] | ||
| {{HoverText| | | {{HoverText|N/A|Use llGetUsername in conjunction with llDetectedKey.}} | ||
|- | |- | ||
! {{Hl2}} | {{LSLGC|Legacy Name | ! {{Hl2}} | {{LSLGC|Legacy Name}} | ||
| An interface predating [[Display Names]]. | | An interface predating [[Display Names]]. | ||
| Yes | | Yes | ||
Line 37: | Line 37: | ||
|} | |} | ||
{| {{prettytable|style=float:right;margin-top:0;}} | {| {{prettytable|style=float:right;margin-top:0;}} | ||
|+ | |+ Name Formats by Account Type | ||
| | | | ||
! {{Hl2}} | Modern | ! {{Hl2}} | Modern | ||
! {{Hl2}} | Legacy | ! {{Hl2}} | Legacy | ||
|- | |||
! {{Hl2}} | Default {{LSLGC|Display Name}} | |||
| "FirstName" | |||
| "FirstName LastName" | |||
|- | |- | ||
! {{Hl2}} | {{LSLGC|Username}} | ! {{Hl2}} | {{LSLGC|Username}} | ||
| " | | "firstname" | ||
| "firstname.lastname" | | "firstname.lastname" | ||
|- | |- | ||
! {{Hl2}} | {{LSLGC|Legacy Name}} | ! {{Hl2}} | {{LSLGC|Legacy Name}} | ||
| " | | "FirstName Resident" | ||
| "FirstName LastName" | | "FirstName LastName" | ||
|} | |} | ||
Line 61: | Line 61: | ||
To maintain compatibility with legacy scripts (that expect two names), modern accounts are given the legacy last name "Resident". | To maintain compatibility with legacy scripts (that expect two names), modern accounts are given the legacy last name "Resident". | ||
The default value of the Display Name depends upon the type of the account. For | The default value of the Display Name depends upon the type of the account. For modern accounts, it is the first part of the Legacy Name (without the space and last name "Resident"; this is the same as the Username but capitalization used at registration time is preserved). For legacy accounts, it is the full Legacy Name. | ||
<lsl>string LegacyToUsername(string legacy) | <lsl>string LegacyToUsername(string legacy) | ||
{ | { | ||
list name = llParseString2List(llToLower(legacy), [" "],[]); | list name = llParseString2List(llToLower(legacy), [" "],[]); | ||
if(llList2String(name, 1) == "resident")//it | if(llList2String(name, 1) == "resident")//it is not a legacy account. | ||
return llList2String(name, 0);//first name is username | return llList2String(name, 0);//first name is username | ||
return llDumpList2String(name, "."); | return llDumpList2String(name, "."); | ||
Line 80: | Line 80: | ||
===FAQs=== | ===FAQs=== | ||
There are a couple of FAQs that go into much more detail about this: | There are a couple of FAQs that go into much more detail about this: | ||
* LSL FAQ: [[ | * LSL FAQ: [[Display Names/LSL]] | ||
* General FAQ: [[ | * General FAQ: [[Display Names]] |
Revision as of 13:40, 24 February 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Names
From an LSL standpoint avatars can have 3 different names.
Names: | Description | Unique | Get (in region) | Request (dataserver) | llSensor(Repeat) flags | detected events |
---|---|---|---|---|---|---|
Display Name | The name that is displayed on the screen. | No | llGetDisplayName | llRequestDisplayName | N/A | N/A |
Username | The name the users logs in with. | Yes | llGetUsername | llRequestUsername | AGENT_BY_USERNAME | N/A |
Legacy Name | An interface predating Display Names. | Yes | llKey2Name | llRequestAgentData | AGENT_BY_LEGACY_NAME | llDetectedName |
Modern | Legacy | |
---|---|---|
Default Display Name | "FirstName" | "FirstName LastName" |
Username | "firstname" | "firstname.lastname" |
Legacy Name | "FirstName Resident" | "FirstName LastName" |
Modern and Legacy Accounts
- Modern accounts are created by choosing a user name, which consists of one name (no spaces).
- Legacy accounts were created by choosing two names: first and last names. These two names are used together to form the username.
To maintain compatibility with legacy scripts (that expect two names), modern accounts are given the legacy last name "Resident".
The default value of the Display Name depends upon the type of the account. For modern accounts, it is the first part of the Legacy Name (without the space and last name "Resident"; this is the same as the Username but capitalization used at registration time is preserved). For legacy accounts, it is the full Legacy Name.
<lsl>string LegacyToUsername(string legacy) {
list name = llParseString2List(llToLower(legacy), [" "],[]); if(llList2String(name, 1) == "resident")//it is not a legacy account. return llList2String(name, 0);//first name is username return llDumpList2String(name, ".");
}</lsl>
Legacy-Name Only Functions
These functions only take Legacy Names and there are no alternative functions available.
- llCollisionFilter
- llListen - likewise the listen event only has a Legacy Name parameter.
FAQs
There are a couple of FAQs that go into much more detail about this:
- LSL FAQ: Display Names/LSL
- General FAQ: Display Names
Subcategories
This category has the following 5 subcategories, out of 5 total.
Pages in category "LSL Avatar/Name"
The following 9 pages are in this category, out of 9 total.