Jump to content

skip object from creator


MrSndbad
 Share

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

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

Recommended Posts

hello friends 

i make this script to get descruption  from creator and everything is work good but i have probelm some time the script Detecte other creater descruption if this object closer so is there way to fix that i need only creater what  UUID set 

thanks

 

list details;
default
{

    touch_start(integer total_number)
    {

        llSensor( ""," ", ( AGENT | PASSIVE | ACTIVE ), 1, PI );
    }
                sensor(integer num_detected)
    {
        while(num_detected--)
        {
            
            
                     if (llList2Key(llGetObjectDetails(llDetectedKey(num_detected), [OBJECT_CREATOR]), 0) ==  "8fe80e88-9dee-47d6-bbe9-811c547468d4")
         {
                
              key  id  = llDetectedKey(0);
              details = llGetObjectDetails(id, ([OBJECT_DESC]));
             llSay(0,llList2String(details, 0));

         }

     }

}
}

 

Link to comment
Share on other sites

it's because you're using llDetectedKey(0), so that will always only get the first id from the list of detected keys. that would need to be llDetectedKey(num_detected)

however, instead of calling llGetObjectDetails more than once for each object, just call it once, check the creator, and if it is a match, say the description. I cleaned it up a bit below

list details;key creatorid = "8fe80e88-9dee-47d6-bbe9-811c547468d4";default{    touch_start(integer total_number)    {        llSensor( ""," ", ( AGENT | PASSIVE | ACTIVE ), 1, PI );    }    sensor(integer num_detected)    {        while(num_detected--)        {            key obj = llDetectedKey(num_detected);            details = llGetObjectDetails(obj,[OBJECT_CREATOR,OBJECT_DESC]);            key creator = llList2Key(details,0);            string desc = llList2String(details,1);            if (creator == creatorid)            {                llSay(0,desc);            }         }     }}
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2621 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...