llIsFriend
function
Function syntax
integer llIsFriend(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.
integer result = llIsFriend(NULL_KEY);Specification
Section titled “Specification”- If the prim is owned by a group this function behaves identically to
llSameGroup - This function will return
FALSEunder 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
Section titled “Caveats”- You are not your own friend.
Examples
Section titled “Examples”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."); } }}See also
Section titled “See also”Functions
Section titled “Functions”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.