LlIsFriend
Looking for the current API? Open the llIsFriend reference →
Return value notes
Specification
- If the prim is owned by a group this function behaves identically to llSameGroup
- This function will return FALSE under the following edge cases:
- If neither the owner, nor the target agent are in the region.
- If the agent_id does not specify an agent.
Caveats
- You are not your own friend.
Examples
default
{
state_entry()
{
llSensorRepeat("", NULL_KEY, AGENT, 95, PI, 10);
}
sensor(integer count)
{
integer index;
for (index = 0; index < count; ++index)
{
string is_is_not = " is NOT ";
if (llIsFriend(llDetectedKey(index)))
{
is_is_not = " is ";
}
llSay(0, llDetectedName(index) + is_is_not + "a friend.");
}
}
}See also: functions
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{LSL Injection Test}}{{#if:
{{#vardefine:p_{{{1|none}}}_desc|{{#if:{{{pd|}}}|{{{pd|}}} }}{{#if:{{{group|1}}}|{{LSLGC|Group|group}}, }}{{LSLGC|Avatar|avatar}} or {{#if:{{{object|}}}|[[object]]|[[prim]]}} {{HoverLink|UUID|Universally Unique Identifier}} {{#if:{{{sim|}}}|that is in the same [[region]] {{#switch:{{{sim|}}}|*=|#default =  {{{sim|}}}}}
}}}}
{{#vardefine:p_{{{1|none}}}_hover|{{#if:{{{ph|}}}|{{{ph|}}} |{{#if:{{{pd|}}}|{{{pd|}}} }}}}{{#if:{{{group|1}}}|group, }}avatar or {{#if:{{{object|}}}|object|prim}} UUID {{#if:{{{sim|}}}|that is in the same region {{#switch:{{{sim|}}}|*=|#default =  {{{sim|}}}}}
}}}}
<includeonly>
{{#ifeq:{{#var:article-type}}|event||{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{LSLC|Avatar/As A Parameter}}
}}}}}}
</includeonly>
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|none}}}_desc}}
|-
|hover
|{{#var:p_{{{1|none}}}_hover}}
|}
</noinclude>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.