llAgentInExperience

From Second Life Wiki
Revision as of 13:22, 8 July 2014 by Jeremy Linden (talk | contribs) (Created page with "Category:Experience Tools {{LSL_Function |func=llAgentInExperience |func_desc=Determines whether or not the agent is in the script's experience. |func_footnote=Returns TRUE i…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Function: integer llAgentInExperience( key agent );

Determines whether or not the agent is in the script's experience.
Returns an integer

• key agent Key of the agent to query

Returns TRUE if the agent is in the experience and the experience can run in the current region.

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");
              llClearExperiencePermissions(llDetectedKey(0));
          }
      } 
}</lsl>

Deep Notes

Search JIRA for related Issues

Signature

function integer llAgentInExperience( key agent );