Jump to content

Rowan Afterthought

Resident
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Rowan Afterthought

  1. 16 minutes ago, Rolig Loon said:

    You might find one of the handy functions at http://wiki.secondlife.com/wiki/Category:LSL_List#Extended_List_Operations useful, or you could modify one to do what you want.

    I did see those before! And while they are very neat tools and some of them would do what I need, they also utilize loops for comparing lists.

    I'm trying to avoid using loops, since to my knowledge they add quite a lot of script time lag. And I want my item to be as impact-less on people's in-world experience as possible.
    I'm guessing no such functionality exists without a loop, sadly.

  2. I'm trying to avoid using loops to run through list entries when comparing two lists. Since I need to compare a few lists at once in sequence.
    I'd love to find a function that says "If List A has any entry from list B return true."

    Example:

    Comparing
    list A = [1,2,3];

    and

    list B = ["a",1,"c"];

    Returns TRUE because they both have 1 as an entry anywhere in their order.

     

    llListFindList doesn't work because both entire lists have to be exactly equal OR they have to be compared with each entry separately in a loop.
    My search through the LSL wiki so far as not been fruitful!

    • Like 1
  3. If I own a sim, and divide it up into parcels (so, say, I can have different windlight settings for each area OR rent out parcels ETC)...

    Does the traffic on all of them count towards the "main" location in search?

     

    Example: A club has a sim that is divided into 4 sections. The main club where events happen is on 1 fourth, but there are attractions for patrons on the other three fourths where they can go and hang out.

    Do the other three count for the one if deeded to the same group, or is it split. (In terms of what shows up in the search)

  4. Original: if(Tpos!=(OP1|OP2)) { }
    
    What it's doing: if (Detected Vector != ( Vector1 | Vector2 ) ) { }

     

    On this line in my script, I get a type mismatch error after "Vector2".

    Since it is indeed a vector comparing to other vectors,(double checked) I'm probably doing the operator wrong. I am eternally confused by some operators. So, since I haven't been able to find an answer to this, here goes: What am I doing wrong, or how do you compare (Xvector to Yvector OR Zvector)?

  5. 13 minutes ago, KT Kingsley said:

    When the list List is created the value is stored as a string, so when you look for the key returned by llDetecedKey a match is not found.

    Thank you for this!

    With that in consideration, it is now working as expected. It's always the small nuances that I over look...

     

    list List = ["n","8562eb25-0a93-4c6d-9a9e-380fb123a571","aa430197-791d-480d-90ed-5c0b4588416d","13056ed9-7351-446d-b7ee-3152aeffed1a"];
    default
    {
        touch_start(integer total_number)
        {
            list TOUCHER = [(string) llDetectedKey(0)];
            integer found = llListFindList(List,TOUCHER);
            if(found!=-1){llSay(0,"Found");llSay(0,(string)found);}
            else{llSay(0,"Not Found");llSay(0,(string)found);}
        }
    }

    13056ed9-7351-446d-b7ee-3152aeffed1a = my key.

    Touching returns:

    [15:36] Object: Found
    [15:36] Object: 3

    As expected.

    Thank you everyone for your replys!

    • Like 1
  6. To be clear, I am trying to make a note card based UUID blacklist.

    This code and post is just to figure out what the heck is going on with ListFindList. Because I'm baffled.

  7. list List = ["n","n","13056ed9-7351-446d-b7ee-3152aeffed1a"];
    default
    {
        touch_start(integer total_number)
        {
            list TOUCHER = [llDetectedKey(0)];
            integer found = ~llListFindList(List,TOUCHER);
            if(found){llSay(0,"Found");llSay(0,(string)found);}
            else{llSay(0,"Not Found");llSay(0,(string)found);}
        }
    }

    Result when touched:
    [14:37] Object: Not Found
    [14:37] Object: 0

    The integer that is reported should be 2, corresponding to my UUID in the list when it matches my UUID upon touching the object.

    -1 means it was not found in the list by listfindlist.

    As far as I know (found) should be triggered when the integer is not negative.

    As you can see, it's not finding my UUID in the list and listing it's integer as 0... when it should be -1 for failed find or 2 for the list position.

    I've been messing with this for a few days and am completely lost as to how to make it work.

  8. 7 minutes ago, Qie Niangao said:

    You're on the right track, I think, but you don't need to upload an internal animation -- just use the one that's built-in. See "away" and "busy" in the User-Playable Animations table.

    I did try llStartAnimation with the uuid for away... but looking back that's not how startanim works it seems.

    Is there code for forcing agent info? ...like llGetAgentInfo but changing the tags?

  9. I'm looking for a way to trigger the little "away" text to show up in the name tag.

    I have seen a friend, a long time ago, get it working in a hud. For both Away and Busy statuses...

    I tried uploading an internal animation for avatar_away, but (maybe obviously) it's just the hip bend and doesn't activate true away status.

    Any help would be appreciated ❤️

×
×
  • Create New...