Difference between revisions of "LlAgentInExperience"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 13: Line 13:
|also_functions=
|also_functions=
*[[llGetExperienceDetails]]
*[[llGetExperienceDetails]]
*[[llGetExperienceList]]
|examples=<lsl>default
|examples=<lsl>default
   {
   {
Line 26: Line 25:
           {
           {
               llOwnerSay(llDetectedName(0)+ " is in my experience");
               llOwnerSay(llDetectedName(0)+ " is in my experience");
              llClearExperiencePermissions(llDetectedKey(0));
           }
           }
       }  
       }  

Revision as of 07:08, 9 July 2014

Summary

Function: integer llAgentInExperience( key agent );

Determines whether or not the specified agent is in the script's experience.
Returns a boolean (an integer) that is TRUE if the agent is in the experience and the experience can run in the current region.

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

Examples

<lsl>default

  {
      touch_start(integer total_number)
      {
          if(llAgentInExperience(llDetectedKey(0)))
          {
              llOwnerSay(llDetectedName(0)+ " is not in my experience");
              llRequestExperiencePermissions(llDetectedKey(0), "");
          }
          else
          {
              llOwnerSay(llDetectedName(0)+ " is in my experience");
          }
      } 
}</lsl>

See Also

Deep Notes

Signature

function integer llAgentInExperience( key agent );