Unofficial LSL Reference

[[functions:llagentinexperience]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

This page uses content from the Second Life® Wiki article
http://wiki.secondlife.com/wiki/LlAgentInExperience
Copyright © 2007-2012 Linden Research, Inc. Licensed under the Creative Commons Attribution-Share Alike 3.0 License (see the complete license terms).

Function: llAgentInExperience

Function: integer llAgentInExperience( key agent );

Determines whether or not the specified agent is in the script's experience.

Parameters

agent

• key agent – avatar UUID that is in the same region to query.

Return value

Returns a boolean (an integer) that is TRUE if the agent is in the experience and the experience can run in the current region.

Complete examples

llAgentInExperience-example.lsl
default
{
  touch_start(integer total_number)
  {
    if(llAgentInExperience(llDetectedKey(0)))
    {
      llOwnerSay(llDetectedName(0)+ " is in my experience");
    }
    else
    {
      llOwnerSay(llDetectedName(0)+ " is not in my experience");
    }
  } 
}

See also