Jump to content

Is this example script wrong?


Loki Eliot
 Share

You are about to reply to a thread that has been inactive for 3568 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Trying to get my head around the requesting of the Experience Perms using the example script for llAgentInExperience

using...

 

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");
           }
       } 
   }

But is'nt this script written back to front?

should it not be ....

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");
llRequestExperiencePermissions(llDetectedKey(0), "");
}
}
}
Link to comment
Share on other sites

  • Lindens

The llOwnerSay is reversed, but I think the intention of having the permission request when the agent is in the experience is that the script can expect that the permission request will succeed. You normally wouldn't want to do anything like that, you would just call llRequestExperiencePermissions and handle the events. This method is mostly useful to interrogate another agent rather than the one the script has permissions for. You might, for example, rez different objects from inventory based on the agent being in the experience or not.

 

{  ( total_number)  {    (llAgentInExperience((0)))    {





}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3568 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...