Skip to content
lsl.devlsl.devLSL Dev

llIsFriend

function
Function syntax
integer llIsFriend(
  1. key agent_id// UUID of the agent to check.
);
Returns
integer
Energy
10

Returns an integer that is TRUE if agent_id and the owner of the prim the script is in are friends, otherwise FALSE.

How to use
integer result = llIsFriend(NULL_KEY);
  • 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.
  • You are not your own friend.
Example 1
11 collapsed lines
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.");
}
}
}
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.

From the Second Life Wiki

Community documentation adapted from LlIsFriend, by Linden Research, Inc. and contributing residents.View contributors and history.

Built from these wiki pages, as imported:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.