Jump to content

Surssin

Resident
  • Posts

    40
  • Joined

  • Last visited

Posts posted by Surssin

  1. I can't seem to get it to work. I can get it to detect if I'm sitting when I attach it, but I can't get a timer to recheck the status of sitting/not.

    My best effort.

    integer gSitting;
    integer sit;
    key ID;
    default
    {
       state_entry()
        {
       llSetTimerEvent(5.0);
        }
        attach(key ID)
        {  
            sit = llGetAgentInfo(ID);
            if (sit & AGENT_SITTING)
                {
                    llOwnerSay("Is sitting");
                }
                else
                {
                    llOwnerSay("Has stood up");
                }
            }
        timer()
        {
            key ID;
            integer sitting = llGetAgentInfo(ID)&(AGENT_SITTING|AGENT_ON_OBJECT);
            if(sitting!=gSitting)
            {
                gSitting=sitting;
                if(gSitting)
                {
                    llOwnerSay("Is sitting");
                }
                else
                {
                    llOwnerSay("Has stood up");
                }
                llOwnerSay((string)sitting);
            }
        }

    }

  2. 51 minutes ago, Quistess Alpha said:

    If you care what the avatar is sitting on, you can use llGetObjectDetails, OBJECT_ROOT , but you still have to check on a timer (or maybe a control event but that would be kinda wonky, I'm almost tempted to try that with llSetMinEventDelay to see if it would reasonably work though.)

    ETA: if you don't need to detect ground sits, this mostly works:

    integer gSitting;
    default
    {   state_entry()
        {   llMinEventDelay(2.0);
        }
        attach(key ID)
        {   if(ID) llRequestPermissions(ID,PERMISSION_TAKE_CONTROLS);
        }
        run_time_permissions(integer perms)
        {   if(perms&PERMISSION_TAKE_CONTROLS) llTakeControls(0x06000300,TRUE,TRUE);
            // 0x06000000 is the sum of the undocumented left+right 'rotation detected' controls.
            // 0x300 is normal left+right rotation.
        }
        control(key ID, integer level, integer edge)
        {   integer sitting = llGetAgentInfo(ID)&(AGENT_SITTING|AGENT_ON_OBJECT);
            if(sitting!=gSitting)
            {   gSitting=sitting;
                if(gSitting)
                {   llOwnerSay("Is sitting");
                }else
                {   llOwnerSay("Has stood up");
                }
                llOwnerSay((string)sitting);
            }
        }
    }

    but if you're not that hyper-concerned about efficiency and need ground-sit detection, then just replace the control event with a timer, and set the timer in state_entry instead of the minEventDelay, and remove the attach and run_time_perms events.

     

    hm, when I try it, I don't get the responses when I sit on something. I'll try the adjustments you mentioned after work.

    Unless someone has a different way to do it.

  3. I don't care what I'm sitting on. It's all about "am I sitting?"

    I managed to man-handle the example into accurately detecting sit on attach. So that's one part down. Thanks for that.

    Now I just need help with the timer part, or whatever I need, to have it detect when I stand up.

    • Like 1
  4. I swear I've tried to find ways to do it, so I'm probably looking right past some simple example.

    I want to have an attachment react to the wearer sitting vs not sitting. Both when it's attached, or just "oh hey, you're sitting now. We're going to do X. Oh you stood up? Okay. We'll do Y."

    I'm confident I can get it to do what I want it too when those states are detected, but I can't figure out how to get it to detect sitting vs not. I saw about the llGetAgentInfo, but I'm at a loss as to how to use that to do what I'm looking for.

    P.S. Noob scriptor. Forgive me missing anything simple. :)

  5. 21 minutes ago, Lucia Nightfire said:

    That entire script could be significantly condensed too, albeit less "readable", heh.

    For someone better than me, I have absolutely no doubt. But this is a system I understand and can adapt to fit my end goals (such as easily adding or removing options). So if I can get it to operate with the main menu, that'll do. I'm not good enough to condense it.

    And I plan to eventually sell these scripts so people can build their own gags like I did. Getting someone to do all of that work for free or a price I can afford with that understanding is highly unlikely.

  6. I don't think that's it. With out that line, I get a "Dead code found beyond return statement" error, and STILL get the other error as well. I added that in as an attempt at a cheat to get around that.

    Edit: The "Not all code paths return a value" error jumps to the end of the script, if that helps.

  7. So with a little help I DID finally clear the syntax error. Had to cheat a little to get around a "dead code" error, but now I get a different one; "Not all code paths return a value"

    I think it's time I just posted the whole second script (the first one is behaving, though no idea if the linking works yet), and see if I can get schooled on what I'm missing and how to make what I want to happen, happen.

    For reference, "RLV 1..." is the first page of this second script's menu, and the one the main menu would call up when someone chooses "RLV" on the main meny. I'll also need to tune things so that when "Main Menu" is chosen, you get the main menu.

    integer RLVFlags=65533; 
    
    list pList; 
    key tkey; 
    
    
    RLVRefresh()
    {
           if(RLVFlags & 4)
                trestrict += ",showinv=y";
            else
                trestrict += ",showinv=n";
                            
            if(RLVFlags & 32)
                trestrict += ",addoutfit=y,addattach=y";
            else
                trestrict += ",addoutfit=n,addattach=n";
                
            if(RLVFlags & 64)
                trestrict += ",remoutfit=y,remattach=y";
            else
                trestrict += ",remoutfit=n,remattach=n";
                
            if(RLVFlags & 128)
                trestrict += ",touchattachother=y";
            else
                trestrict += ",touchattachother=n";
                
            if(RLVFlags & 256)
                trestrict += ",touchattachself=y";
            else
                trestrict += ",touchattachself=n";
                
            if(RLVFlags & 512)
                trestrict += ",touchworld=y";
            else
                trestrict += ",touchworld=n";
                
            if(RLVFlags & 1024)
                trestrict += ",edit=y";
            else
                trestrict += ",edit=n";
                
            if(RLVFlags & 2048)
                trestrict += ",rez=y";
            else
                trestrict += ",rez=n";
                
            if(RLVFlags & 4096)
                trestrict += ",touchfar=y";
            else
                trestrict += ",touchfar=n";
                
            if(RLVFlags & 8192)
                trestrict += ",sittp=y";
            else
                trestrict += ",sittp=n";
                
            if(RLVFlags & 16384)
                trestrict += ",showworldmap=y,showminimap=y";
            else
                trestrict += ",showworldmap=n,showminimap=n";
                
            if(RLVFlags & 24)
                trestrict += ",shownearby=y,shownametags=y";
            else
                trestrict += ",shownearby=n,shownametags=n";
                
            if(RLVFlags & 32768)
                trestrict += ",startim=y";
            else
                trestrict += ",startim=n";
                            
            llOwnerSay(trestrict);
        }
    
    string IsOffOn(integer value)
    {
        if(value)
            return "off";
        return "on";   
    }
    
    string IsBlockedAllowed(integer value)
    {
        if(value)
            return "allowed";
        return "BLOCKED";   
    }
    
    string At()
    {
     
    
    {
        }
        
        if(option == "RLV 1...")
        {
            
            
            
            tstring = "Configure the current RLV options (1/2).\nRLV is currently ";
            
            if(RLVFlags & 1) tstring += "ACTIVE\n\n";
            else tstring += "DISABLED\n\n";
            
            tstring += "Current Restrictions:"+"\nInventory - "+
    IsBlockedAllowed(RLVFlags & 4) +"\nWear clothing - "+ IsBlockedAllowed(RLVFlags & 32) +"\nUnwear clothing - "+ IsBlockedAllowed(RLVFlags & 64) +"\nTouch attach (other) - "+ IsBlockedAllowed(RLVFlags & 128) +"\nTouch attach (self) - "+ IsBlockedAllowed(RLVFlags & 256) +"\nTouch world - "+ IsBlockedAllowed(RLVFlags & 512) +"\n(More on page 2)";
    
            tlist = ["Disable All RLV", "Unwear "+ IsOffOn(RLVFlags & 64), "Touch Wld "+ IsOffOn(RLVFlags & 512), "Enable Most RLV", "Wear "+ IsOffOn(RLVFlags & 32), "Touch Sel "+ IsOffOn(RLVFlags & 256), "Enable All RLV", "Inv. "+ IsOffOn(RLVFlags & 4), "Touch Oth "+ IsOffOn(RLVFlags & 128), "Main Menu", "RLV 2..."];
        }
        else if(option == "RLV 2...")
        {
            
            
            
            tstring = "Configure the current RLV options (2/2).\nRLV is currently ";
            
            if(RLVFlags & 1) tstring += "ACTIVE\n\n";
            else tstring += "DISABLED\n\n";
            
            tstring += "Current restrictions:\nEdit - "+ IsBlockedAllowed(RLVFlags & 1024) +"\nRez - "+ IsBlockedAllowed(RLVFlags & 2048) +"\nMaps & Location "+ IsBlockedAllowed(RLVFlags & 16384) +"\nFar touch - "+ IsBlockedAllowed(RLVFlags & 4096) +"\nFar sit - "+ IsBlockedAllowed(RLVFlags & 8192) +"\nStartIM - "+ IsBlockedAllowed(RLVFlags & 32768) +"\nNametags & Radar - "+
    IsBlockedAllowed(RLVFlags & 24) +"\n(More on page 1)";
    
            tlist = ["Disable All RLV", "Maps "+ IsOffOn(RLVFlags & 16384), "Nametags "+ IsOffOn(RLVFlags & 24), "Enable Most RLV", "Rez "+ IsOffOn(RLVFlags & 2048), "StartIM "+ IsOffOn(RLVFlags & 32768), "Enable All RLV", "Edit "+ IsOffOn(RLVFlags & 1024), "Farsit "+ IsOffOn(RLVFlags & 8192), "Main Menu", "RLV 1...", "Fartouch "+ IsOffOn(RLVFlags & 4096)];
        
                }
        
        else if(llSubStringIndex(message, "Inv. ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 4) ^ 4);
            else
                RLVFlags = RLVFlags | 4;
            remenu = "RLV...";
        }
        else if(llSubStringIndex(message, "Wear ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 32) ^ 32);
            else
                RLVFlags = RLVFlags | 32;
            remenu = "RLV...";
        }
        else if(llSubStringIndex(message, "Unwear ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 64) ^ 64);
            else
                RLVFlags = RLVFlags | 64;
            remenu = "RLV...";
        }
        else if(llSubStringIndex(message, "Touch Oth ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 128) ^ 128);
            else
                RLVFlags = RLVFlags | 128;
            remenu = "RLV...";
        }
        else if(llSubStringIndex(message, "Touch Sel ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 256) ^ 256);
            else
                RLVFlags = RLVFlags | 256;
            remenu = "RLV...";
        }
        else if(llSubStringIndex(message, "Touch Wld ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 512) ^ 512);
            else
                RLVFlags = RLVFlags | 512;
            remenu = "RLV...";
        }
        else if(llSubStringIndex(message, "Edit ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 1024) ^ 1024);
            else
                RLVFlags = RLVFlags | 1024;
            remenu = "RLV 2...";
        }
        else if(llSubStringIndex(message, "Rez ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 2048) ^ 2048);
            else
                RLVFlags = RLVFlags | 2048;
            remenu = "RLV 2...";
        }
        else if(llSubStringIndex(message, "Fartouch ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 4096) ^ 4096);
            else
                RLVFlags = RLVFlags | 4096;
            remenu = "RLV 2...";
        }
        else if(llSubStringIndex(message, "Farsit ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 8192) ^ 8192);
            else
                RLVFlags = RLVFlags | 8192;
            remenu = "RLV 2...";
        }
        else if(llSubStringIndex(message, "StartIM ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 32768) ^ 32768);
            else
                RLVFlags = RLVFlags | 32768;
            remenu = "RLV 2...";
        }
        else if(llSubStringIndex(message, "Maps ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 16384) ^ 16384);
            else
                RLVFlags = RLVFlags | 16384;
            remenu = "RLV 2...";
        }
            else if(llSubStringIndex(message, "Nametags ") == 0)
        {
            if(llGetSubString(message, -3, -1) == "off")
                RLVFlags = ((RLVFlags | 24) ^ 24);
            else
                RLVFlags = RLVFlags | 24;
            remenu = "RLV 2...";
        }
        else if(message == "Enable Most RLV")
        {
            RLVFlags = ((RLVFlags | 4) ^ 4);        
            RLVFlags = ((RLVFlags | 32) ^ 32);        
            RLVFlags = ((RLVFlags | 64) ^ 64);
            RLVFlags = ((RLVFlags | 128) ^ 128);
            RLVFlags = ((RLVFlags | 256) ^ 256);
            RLVFlags = ((RLVFlags | 1024) ^ 1024);
            RLVFlags = ((RLVFlags | 2048) ^ 2048);
            RLVFlags = ((RLVFlags | 16384) ^ 16384);
            remenu = "RLV...";
        }
            else if(message == "Enable All RLV")
        {
            RLVFlags = ((RLVFlags | 4) ^ 4);        
            RLVFlags = ((RLVFlags | 32) ^ 32);        
            RLVFlags = ((RLVFlags | 64) ^ 64);
            RLVFlags = ((RLVFlags | 128) ^ 128);
            RLVFlags = ((RLVFlags | 256) ^ 256);
            RLVFlags = ((RLVFlags | 512) ^ 512);
            RLVFlags = ((RLVFlags | 1024) ^ 1024);
            RLVFlags = ((RLVFlags | 2048) ^ 2048);
            RLVFlags = ((RLVFlags | 4096) ^ 4096);
            RLVFlags = ((RLVFlags | 8192) ^ 8192);
            RLVFlags = ((RLVFlags | 16384) ^ 16384);
            remenu = "RLV...";
        }
        else if(message == "Unsit")
        {
            llOwnerSay("@unsit=force");
            remenu = "RLV...";
        }
        else if(message == "Disable All RLV")
        {
            RLVFlags = RLVFlags | 65533;
            remenu = "RLV...";
        }
        else if(message == "Main Menu")
        {
            llMessageLinked(LINK_THIS,0,"Main Menu","");
        }
        else if(message == "Clear")
        {
            RLVFlags = RLVFlags | 65533;
    
        }
    
      }              
    default
    {
        state_entry()
        {
        }
    }

     

  8. Well one script it's saying the error is the very last bracket at the end. not sure how to post that one.

    The other is this section, with a little bit above and below for some context. (I haven't added MY options/commands to it yet)

    Quote

            tstring = "Select how Vison will be impared.";
            
            tlist = ["Mask 1", "Mask 2", "Mask 3",
            "Blind 6", "Blind 5", "Blind 4",
            "Blind 3", "Blind 2", "Blind 1",
            "Main Menu", "Blind Off", "Mask Off"];
        }
            
        
        else if(option == "RLV...")
        {
            listen(integer channel, string name, key id, string message)
    {
         if (message == "Next Level")
         {
              llMessageLinked(LINK_THIS, 0, message, kToucher);
         }
    }
        }
        else if(option == "Reins...")

     

  9. *sighs*

    I think I'll need to find direct help with this one. I keep getting "syntax errors". I know it has to do with the brackets ( { } ), but I can't figure out why. I've never been able to understand exactly when you need which and how many. So I can't even figure out if I'm doing the linked parts right.

  10. 16 minutes ago, Rolig Loon said:

    And use the "Return" message in the main script as a trigger to go on with its next step (open a new dialog, change states, whatever ...), confident that the second level script is now inactive.  That's probably overkill, but it's an example of how you might be sure that the two scripts aren't competing.  Stopping the timer in one script stops it in the other and then life goes on...

    Okay. Following so far.

    So for those other commands I mentioned, I'll need to add a messagelink too, right? (Button on main menu is pressed, setting X on this separate script needs to be applied.)

  11. 6 minutes ago, Rolig Loon said:

    I probably don't have to add the obvious, but I will ... Whenever you pass control from one script to another, you open all manner of possibilities for race conditions and for accidentally getting variables out of sync with each other.  Also, the stuff that I left out in the answer above includes opening/closing timers and whatnot, and being sure not to have the dataserver event in one script responding to a query initiated in the other.  Just be careful to think about how you want to toss control back and forth.  It's really easy to get messed up.

    I'm still learning SO much about scripting so a lot of that went over my head. lol.

    In my case, at least as far as I can think, just about all of the elements of the menu section I want to separate out would be self contained in its own script. Though there are a couple of commands in the primary that the secondary would need to listen for. One being an end of timer event (timer hits zero, set setting X).

  12. I swear I looked for it but my search wording SUCKS, so I apologize if I looked right over it. I'm trying to figure out how to do something.

    So I have one script that is just too full. I've seen many things have an entire section of their menu on a different script, but it's all one menu system. I was wondering how I would do that. If I could split this one, long part of my menu into it's own script, it would give me all of the memory space I need to do the things I want to do.

    As an example of what I mean; say you have a tank. It's controlled through one menu you can navigate, but the code for the "main gun" option is on a separate script than where the rest of the menu is. How would I make that happen?

  13. On 1/19/2022 at 12:18 PM, Mollymews said:

     

    without seeing the code changes made then we just be guessing at what the newest issue is

    but if was to guess then should the timer be firing for all states of muzzled | not muzzled | open | close then not all the states are conditioned as they should be

    huh, thought I added an updated reply. Sorry.

    Before I had added a section that looked like this;

    if(openMouth) // attempt to keep mouth open.
                animateMouth();
    
    if(MuzzleMouth) // attempt to keep mouth open.
                animateMouth();

    Now it looks like this, and seems to be working properly now;

    if(openMouth || MuzzleMouth) // attempt to keep mouth open.
                animateMouth();

    Not sure why the second version works but the other had the bug I mentioned. I only know that as far as I can tell it's working now. But I never would have thought of it without the help I got here, so thank you.

    Next rabbit hole: smoother walking while leashed. :P

  14. Well, my fix works, but now I got a different bug going with it. It's like both are competing so when I use my JOMO hud to open my mouth (with gag attached, but no gag set), it cycles so my mouth is constantly opening and closing. So that's not gonna do it.

    Any additional ideas?

  15. 2 hours ago, Mollymews said:

    don't hold me to this because I haven't tested this extensively but I think what happens when we stand, the system stops all animations from playing on our avatar, and then our worn animation scripts kick in and restart the animation(s)

    when our script doesn't kick in then the animation doesn't restart

    i think that your issue is in the timer event. After you stand the timer will fire within 1 second and restart the OpenMouth animation and doesn't restart the ClosedMouth animation. This condition here:

    if(openMouth) // attempt to keep mouth open.
                animateMouth();

    in the first instance suggest to try animateMouth() without the IF condition so it works for both Open and Closed and then work it up from there

     

     

    Actually... I think you got it backwards, but still found the right hole in the code. The problem is there's no entry for "MuzzleMouth" (the closed mouth state) in that section and there needs to be.

    I've added a copy of that bit of code but with "MuzzleMouth" instead of "openMouth". So far my testing seems to show it fixed, but please, if anyone else thinks my problem lies elsewhere do chime in. I'll let you know moving forward if I continue to see it fixed. Thank you greatly for taking the time to look it over.

    • Like 1
  16. Quote

    integer Flags=4;

    integer Cchan;
    integer Chandle;

    integer LMhandle;

    integer Gchan;
    integer GListen;
    integer Gsev=0;
    integer Lstate=0;
    integer Gagstate;

    list primlist;

    integer lastchanneltime;
    integer replytime;

    key target;

    key posstarget;
    list cofflelist;

    key poster;

    key grabtarget;

    string texture = "1ea3a87f-75ae-996e-d7f7-98400ba6c58b";

    string deftexture = "1ea3a87f-75ae-996e-d7f7-98400ba6c58b";

    integer openMouth;
    integer MuzzleMouth;

    string oName;
    string tname;
    string gagname;

    string mumble(string mes)
    {
        
        integer i;
        
        list garbrep = [];
        
        if(Gsev == 0 || Flags & 64 || llGetSubString(mes,0,3) == "/me " || llGetSubString(mes,0,5) == "/me's ")
            return mes;
        else
        {
            if(Gsev == 1)
                garbrep = ["l", "w", "r", "w", "s", "f"];
        
            else if(Gsev == 2)
                garbrep = ["r", "w", "l", "w", "y", "w", "q", "w", "j", "w", "d", "s", "f", "b", "g", "t", "g"];
        
            else if(Gsev == 3)
                garbrep = ["a", "r", "b", "r", "j", "r", "s", "r", "v", "r", "z", "r", "d", "f", "k", "f", "l", "f", "w", "f", "g", "n", "x", "n","h", "d", "i", "d", "m", "d", "u", "d", "q", "m"];
        
            else if(Gsev == 4)
                garbrep = ["a", "m", "b", "m", "c", "m", "d", "f", "e", "r", "f", "r", "g", "r", "h", "m", "i", "m", "j", "m", "k", "m", "l", "m","m", "m", "n", "m", "o", "m", "p", "m", "q", "m", "r", "m", "s", "f", "t", "r", "u", "m", "v", "m", "w", "m", "x", "m", "x", "m", "y", "m", "z", "m"];

            else if(Gsev == 5)
                return "";

            for(i = 0; i < llGetListLength(garbrep) - 1; i += 2)
            {
                if(~llSubStringIndex(mes, llList2String(garbrep, i)))
                    mes = llDumpList2String(llParseStringKeepNulls((mes = "") + mes, [llList2String(garbrep, i)], []), llList2String(garbrep, i+1));

                if(~llSubStringIndex(mes, llToUpper(llList2String(garbrep, i))))
                    mes = llDumpList2String(llParseStringKeepNulls((mes = "") + mes, [llToUpper(llList2String(garbrep, i))], []), llToUpper(llList2String(garbrep, i+1)));
            }
            
            mes = (mes = "") + "" + mes;
        }
        return mes;
    }

    animateMouth()
    {
        if(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)
        {
            if(openMouth)
            {
                llStartAnimation("bento_open_mouth");
            }
            else
            {
                llStopAnimation("bento_open_mouth");
                llStartAnimation("bento_close_mouth");
            }
        }
        else
        {
            
            llSleep(1.0);

            llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
        }

        
        if(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)
        {
            if(MuzzleMouth)
            {
                llStartAnimation("MuzzMouth");
            }
            else
            {
                llStopAnimation("MuzzMouth");
            }
        }
        else
        {
            
            llSleep(1.0);

            llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
        }


    }
    RLVRefresh()
    {
        if(Flags & 1 && !(Flags & 64))
        {
            if(Flags & 2)
                llOwnerSay("@detach=n");
            else
                llOwnerSay("@detach=y");
            
            if(Flags & 4 && Gsev > 0)
                llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=add,rediremote:"+(string)Gchan+"=add");
            else
                llOwnerSay("@sendchat=y,emote=add,clear=redirchat,clear=rediremote");
        }

        animateMouth();
    }

    Particles(string tag, integer on, key targ)
    {
        list tlist;
        integer tnum = llListFindList(primlist, [tag]);
        
        target = targ;
        
        if(tnum != -1)
        {
            tnum++;
            tlist = llCSV2List(llList2String(primlist, tnum));
            tnum = llGetListLength(tlist);
            
            integer i;
            
            for(i = 0; i < tnum; i++)
            {
                if(on)
                {
                    Flags = Flags | 8;
                    llLinkParticleSystem(llList2Integer(tlist,i),[
                    PSYS_PART_FLAGS,            PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_TARGET_POS_MASK,
                    PSYS_SRC_PATTERN,           PSYS_SRC_PATTERN_DROP,
                    PSYS_PART_START_SCALE,      <0.09, 0.09, 0.09>,
                    PSYS_PART_END_SCALE,        <0.09, 0.09, 0.09>,    
                    PSYS_PART_MAX_AGE,          5.0,
                    PSYS_SRC_ACCEL,             <0.0, 0.0, -0.5>,
                    PSYS_SRC_TEXTURE,           texture,
                    PSYS_SRC_BURST_RATE,        0.02,
                    PSYS_SRC_TARGET_KEY,        target,
                    PSYS_SRC_OMEGA,             <0.0, 0.0, 0.2> ]);
                }
                else
                {
                    Flags = (Flags | 😎 ^ 8;
                    llLinkParticleSystem(llList2Integer(tlist,i), []);
                }
            }
        }      
    }

    Init()
    {
            if(llGetAttached() <= 0)
            {
                Flags = Flags | 64;
                return;   
            }
            
            Flags = (Flags | 64) ^ 64;
        
            
            if(oName == "" || (oName != llGetDisplayName(llGetOwner()) && llGetDisplayName(llGetOwner()) != "???"))
                oName = llGetDisplayName(llGetOwner());
            if(oName == "" || oName == "???")
            {
                oName = llKey2Name(llGetOwner());
                if(~llSubStringIndex(oName, "Resident"))
                    oName = llGetSubString(oName, 0, -10);
            }
            
            Flags = (Flags | 16) ^ 16;
            llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
            
            
            Flags = (Flags | 1) ^ 1;
            
            llListenRemove(Chandle);
            Cchan = ((integer)("0x"+ llGetSubString(llGetOwner(), 9, 12)) + (integer)("0x"+ llGetSubString(llGetOwner(), 13, 16)));
            Chandle = llListen(Cchan, "", NULL_KEY, "");
            
            llListenRemove(LMhandle);
            LMhandle = llListen(-8888, "", NULL_KEY, "");

            
            if(Flags & 1)
            {
                lastchanneltime = llGetUnixTime();
                if(Flags & 4 && Gsev > 0)
                    llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=add,rediremote:"+(string)Gchan+"=add");
            }
            else
            {
                llOwnerSay("");
            }

            llListenRemove(GListen);        
            GListen = llListen(Gchan, "", llGetOwner(), "");
            
            llSetTimerEvent(1.0);
            
            
            texture = deftexture;
            
            
            integer tnum = llGetNumberOfPrims();
            integer i;
            integer j;
            integer tnum2;
            string tstring;
            list tlist;
            primlist = [];
            
            tlist = llGetLinkPrimitiveParams(1,[PRIM_DESC]);
            primlist += tlist + ["1"];
            
            for(i = 2; i <= tnum; i++)
            {
                tlist = llGetLinkPrimitiveParams(i, [PRIM_NAME, PRIM_DESC]);
                
                for(j=0; j<llGetListLength(tlist); j++)
                {
                    if(llList2String(tlist,j) != "")
                    {
                        tnum2 = llListFindList(primlist,llList2List(tlist,j,j));
                        if(tnum2 != -1)
                        {
                            tnum2++;
                            tstring = llList2String(primlist,tnum2) + ","+(string)i;
                            primlist = llListReplaceList(primlist, [tstring], tnum2, tnum2);
                        }
                        else
                            primlist = primlist + llList2List(tlist,j,j) + [(string)i];   
                    }
                }
            }
            
            
            Flags = Flags | 32;
    }


    HideShow(string tag, float show)
    {
        list tlist;
        integer tnum = llListFindList(primlist, [tag]);
        
        if(tnum != -1)
        {
            tnum++;
            tlist = llCSV2List(llList2String(primlist, tnum));
            tnum = llGetListLength(tlist);
            
            integer i;
            
            for(i = 0; i < tnum; i++)
            {
                llSetLinkAlpha(llList2Integer(tlist,i), show, ALL_SIDES);
            }
        }
    }

    default
    {
        state_entry()
        {
            gagname = llGetDisplayName(llGetOwner());
            Gchan = 3;
            Init();
        }
        

        attach(key id)
        {
            if(id == NULL_KEY)
            {
                if(Flags & 1)
                    llOwnerSay("@clear");
                return;
            }

            Init();
        }

        listen(integer channel, string name, key id, string message)
        {
            if(Flags & 64)
                jump lbreak;
            
            if(id != llGetOwnerKey(id))
            {
                if(channel == Cchan && llGetOwnerKey(id) == llGetOwner())
                {
                    list tlist = llParseString2List(message,[" "],[]);
                    
                    if(message == "HUD Attach")
                        Flags = Flags | 32;
                        
                    else if(message == "Showlocks")
                    {
                        Lstate = 1;
                        Flags = Flags | 2;
                        HideShow("Base2",1.0);
                        HideShow("reins3",1.0);
                        
                        RLVRefresh();
                    }
                    else if(message == "Hidelocks")
                    {
                        Lstate = 0;
                        Flags = (Flags | 2) ^ 2;
                        HideShow("Base2",0.0);
                        HideShow("reins3",0.0);
                        
                        RLVRefresh();
                    }
                    else if(message == "RLV On")
                    {
                        Flags = Flags | 1;
                        RLVRefresh();   
                    }
                    else if(message == "RLV Off")
                        Flags = (Flags | 1) ^ 1;
                        
                    else if(llList2String(tlist,0) == "Reins")
                    {
                        key tkey = llList2Key(tlist,2);
                        
                        if(llList2String(tlist,1) == "Coffle")
                        {
                            if(tkey != NULL_KEY)
                            {
                                posstarget = tkey;
                                poster = NULL_KEY;
                                cofflelist = [];
                                
                                llShout(-8888,(string)tkey+"bcollar");
                                llShout(-8888,(string)tkey+"bbelt");
                                llShout(-8888,(string)tkey+"back");
                                llShout(-8888,(string)tkey+"fbelt");
                                llShout(-8888,(string)tkey+"collar");
                                llShout(-8888,(string)tkey+"pelvis");
                                replytime = 3;
                            }
                        }
                        else if(llList2String(tlist,1) == "Post")
                        {
                            if(tkey != NULL_KEY)
                            {
                                poster = tkey;
                                posstarget = NULL_KEY;
                                replytime = 60;
                            }   
                        }
                        else if(llList2String(tlist,1) == "Grab")
                        {
                            if(tkey != NULL_KEY)
                            {
                                grabtarget = tkey;
                                Particles("reins",1,grabtarget);
                                llShout(-8888,(string)tkey+"handle");
                            }
                        }
                        else if(llList2String(tlist,1) == "Target")
                        {
                            if(tkey != NULL_KEY)
                                Particles("reins",1,tkey);
                        }
                        else if(llList2String(tlist,1) == "Unleash")
                        {
                            grabtarget = NULL_KEY;
                            posstarget = grabtarget;
                            poster = grabtarget;
                            
                            Particles("reins",0,grabtarget);
                            texture = deftexture;
                        }
                        else if(llList2String(tlist,1) == "Find" && llList2String(tlist,2) == "Handle" && grabtarget != NULL_KEY)
                            llShout(-8888,(string)grabtarget+"handle");
                    }
                    else if(llList2String(tlist,0) == "Eye")
                    {
                        if(llList2String(tlist,1) == "YBlindfold")
                        {
                            Flags = Flags | 4;
                            HideShow("Blindfold",1.0);
                            llSleep(0.1);
                        }
                        else if(llList2String(tlist,1) == "NBlindfold")
                        {
                            Flags = Flags | 4;
                            HideShow("Blindfold",0.0);
                            llSleep(0.1);
                        }
                    }
                    else if(llList2String(tlist,0) == "Bit")
                    {

                        if(llList2String(tlist,1) == "Bit")
                        {
                            Flags = Flags | 4;
                            Gagstate = 0;
                            HideShow("Gags",1.0);
                            llSleep(0.1);
                            HideShow("reins2",1.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("CMuzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ball",0.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",1.0);
                            llSleep(0.1);
                            HideShow("Muzzle",0.0);
                            llSleep(0.1);
                            HideShow("Dildo",0.0);
                            llSleep(0.1);
                            HideShow("Dildoin",0.0);
                            llSleep(0.1);
                           HideShow("Ring",0.0);
                            openMouth = TRUE;
                        }
                        else if(llList2String(tlist,1) == "Ball")
                        {
                            Flags = Flags | 4;
                            Gagstate = 0;
                            HideShow("Gags",1.0);
                            llSleep(0.1);
                            HideShow("reins2",1.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("CMuzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ball",1.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",1.0);
                            llSleep(0.1);
                            HideShow("Muzzle",0.0);
                            llSleep(0.1);
                            HideShow("Dildo",0.0);
                            llSleep(0.1);
                            HideShow("Dildoin",0.0);
                            llSleep(0.1);
                            HideShow("Ring",0.0);
                            openMouth = TRUE;
                        }
                        else if(llList2String(tlist,1) == "CMuzzle")
                        {
                            Flags = Flags | 4;
                            Gagstate = 2;
                            HideShow("Gags",0.0);
                            llSleep(0.1);
                            HideShow("reins2",0.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("CMuzzle",1);
                            llSleep(0.1);
                            HideShow("Ball",0.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",0.0);
                            llSleep(0.1);
                            HideShow("Muzzle",0.0);
                            llSleep(0.1);
                            HideShow("Dildo",0.0);
                            llSleep(0.1);
                            HideShow("Dildoin",0.0);
                            llSleep(0.1);                     
                            HideShow("Ring",0.0);
                            openMouth = FALSE;
                        }
                        else if(llList2String(tlist,1) == "Muzzle")
                        {
                            Flags = Flags | 4;
                            Gagstate = 1;
                            HideShow("Gags",0.0);
                            llSleep(0.1);
                            HideShow("reins2",0.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("Muzzle",1);
                            llSleep(0.1);
                            HideShow("CMuzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ball",0.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",0.0);
                            llSleep(0.1);
                            HideShow("Dildo",0.0);
                            llSleep(0.1);
                            HideShow("Dildoin",0.0);
                            llSleep(0.1);                     
                            HideShow("Ring",0.0);
                            llSleep(0.1);
                            openMouth = FALSE;
                        }
                        else if(llList2String(tlist,1) == "Dildo")
                        {
                            Flags = Flags | 4;
                            Gagstate = 0;
                            HideShow("Gags",1.0);
                            llSleep(0.1);
                            HideShow("reins2",1.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("Dildoin",0.0);
                            llSleep(0.1);                     
                            HideShow("Dildo",1);
                            llSleep(0.1);
                            HideShow("CMuzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ball",0.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",0.0);
                            llSleep(0.1);
                            HideShow("Muzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ring",0.0);
                            openMouth = TRUE;
                        }
                        else if(llList2String(tlist,1) == "Ring")
                        {
                            Flags = Flags | 4;
                            Gagstate = 0;
                            HideShow("Gags",1.0);
                            llSleep(0.1);
                            HideShow("reins2",1.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("Ring",1);
                            llSleep(0.1);
                            HideShow("CMuzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ball",0.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",0.0);
                            llSleep(0.1);
                            HideShow("Muzzle",0.0);
                            llSleep(0.1);
                            HideShow("Dildoin",0.0);
                            llSleep(0.1);                     
                            HideShow("Dildo",0.0);
                            openMouth = TRUE;
                        }
                        else if(llList2String(tlist,1) == "Dildoin")
                        {
                            Flags = Flags | 4;
                            Gagstate = 0;
                            HideShow("Gags",1.0);
                            llSleep(0.1);
                            HideShow("reins2",1.0);
                            llSleep(0.1);
                            HideShow("reins",1.0);
                            llSleep(0.1);
                            HideShow("Dildo",0.0);
                            llSleep(0.1);
                            HideShow("Dildoin",1);
                            llSleep(0.1);
                            HideShow("Ring",0.0);
                            llSleep(0.1);                     
                            HideShow("CMuzzle",0.0);
                            llSleep(0.1);
                            HideShow("Ball",0.0);
                            llSleep(0.1);
                            HideShow("Straight Bar",0.0);
                            llSleep(0.1);
                            HideShow("Muzzle",0.0);
                            openMouth = TRUE;
                        }

                        else if(llList2String(tlist,1) == "None")
                        {
                            Flags = (Flags | 4) ^ 4;
                            Gagstate = 0;
                            HideShow("Gags",0.0);
                            HideShow("reins2",0.0);
                            HideShow("reins",0.0);
                            HideShow("Dildo",0.0);
                            HideShow("Dildoin",0.0);
                            HideShow("Ring",0.0);            
                            HideShow("CMuzzle",0.0);
                            HideShow("Ball",0.0);
                            HideShow("Straight Bar",0.0);
                            HideShow("Muzzle",0.0);             
                            openMouth = FALSE;
                            MuzzleMouth = FALSE;
                        
                        }
                        
                        RLVRefresh();
                    }
                    else if(llList2String(tlist,0) == "Garble")
                    {
                        if(llList2String(tlist,1) == "Evade")
                        {
                        llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=rem,rediremote:"+(string)Gchan+"=rem");
                        Gchan = 22;
                        llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=rem,rediremote:"+(string)Gchan+"=add");
    llListenRemove(GListen);
     GListen = llListen(Gchan, "", llGetOwner(), "");
                        }
                        if(llList2String(tlist,1) == "Norm")
                        {
                        llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=rem,rediremote:"+(string)Gchan+"=rem");
                        Gchan = 3;
                        llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=rem,rediremote:"+(string)Gchan+"=add");
    llListenRemove(GListen);
     GListen = llListen(Gchan, "", llGetOwner(), "");
                        }
                        if(llList2String(tlist,1) == "Light")
                        {
                        if (openMouth)
                        {
                        Gsev = 1;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = FALSE;
                        }
                        else
                        {
                        Gsev = 1;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = TRUE;
                        }
                        }
                        else if(llList2String(tlist,1) == "Moderate")
                        {
                        if (openMouth)
                        {
                        Gsev = 2;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = FALSE;
                        }
                        else
                        {
                        Gsev = 2;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = TRUE;
                        }
                        }
                        else if(llList2String(tlist,1) == "Heavy")
                        {
                        if (openMouth)
                        {
                        Gsev = 3;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = FALSE;
                        }
                        else
                        {
                        Gsev = 3;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = TRUE;
                        }
                        }
                        else if(llList2String(tlist,1) == "Impossible")
                        {
                        if (openMouth)
                        {
                        Gsev = 4;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = FALSE;
                        }
                        else
                        {
                        Gsev = 4;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = TRUE;
                        }
                        }
                        else if(llList2String(tlist,1) == "Silence")
                        {
                        if (openMouth)
                        {
                        Gsev = 5;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        MuzzleMouth = FALSE;
                        }
                        else
                        {
                        Gsev = 5;
                        HideShow("Base",1.0);
                        HideShow("reins2",1.0);
                        
                        MuzzleMouth = TRUE;
                        }
                        }
                        else if(llList2String(tlist,1) == "None")
                        {
                        if (Gagstate == 0 || Gagstate == 2)
                        {
                        Gsev = 0;
                        HideShow("Base",0.0);
                        HideShow("reins2",0.0);
                        MuzzleMouth = FALSE;
                        }
                        else if (Gagstate == 1)
                        {
                        Gsev = 0;
                        HideShow("Base",0.0);
                        HideShow("reins2",0.0);
                        MuzzleMouth = TRUE;
                        }
                        }
                        if(Gsev == 0)
                        {
                            if(Gchan > 0)
                            {
                                if(Flags & 1)
                                    llOwnerSay("@sendchat=y,emote=add,redirchat:"+(string)Gchan+"=rem,rediremote:"+(string)Gchan+"=rem");

                                llListenRemove(GListen);
                                Gchan = 0;
                            }    
                        }
                        else if(Gchan == 0)
                        {
                            if(Flags & 1)
                            {
                                lastchanneltime = llGetUnixTime();
                                Gchan = 3;
                                llOwnerSay("@emote=add,sendchat=n,redirchat:"+(string)Gchan+"=add,rediremote:"+(string)Gchan+"=add");
                            }
                            else
                            {
                                Gchan = 3;
                                llOwnerSay("");
                            }
                            
                            llListenRemove(GListen);
                            GListen = llListen(Gchan, "", llGetOwner(), "");   
                        }
                        
                        RLVRefresh();
                    }
                }
                else if(channel == -8888)
                {
                    if((message == (string)grabtarget +"handle ok" || message == (string)grabtarget+"dari|lhattach"|| message == (string)grabtarget+"dari|rhattach") && llGetOwnerKey(id) == grabtarget && grabtarget != NULL_KEY)
                    {
                        Particles("reins",1,id);
                    }
                    else if(message == (string)poster +"post ok" && poster != NULL_KEY)
                    {
                        vector tpos = llList2Vector(llGetObjectDetails(id,[OBJECT_POS]), 0);
                        if(llVecDist(tpos,llGetPos()) <= 20)
                        {
                            Particles("reins",1,id);
                            llSay(Cchan,"Reins Post Target "+ (string)id);
                            grabtarget = NULL_KEY;
                            poster = NULL_KEY;
                            posstarget = NULL_KEY;
                            replytime = 0;
                        }
                    }
                    
                    else if((key)llGetSubString(message,0,35) == posstarget && llGetSubString(message,-2,-1) == "ok" && posstarget != NULL_KEY && llGetOwnerKey(id) == posstarget)
                    {
                        integer tnum = llListFindList(cofflelist,[llGetSubString(message,37,-4)]);
                        if(tnum == -1)
                            cofflelist += [llGetSubString(message,37,-4),id];
                            
                    }
                    if((key)llGetSubString(message,0,35) == llGetOwner() && llGetSubString(message,36,43) == "texture|" && (key)llGetSubString(message,44,-1) != NULL_KEY && llGetOwnerKey(id) == grabtarget && grabtarget != NULL_KEY)
                    {
                        texture = llGetSubString(message,44,79);
                        if(Flags & 😎
                            Particles("reins",1,target);
                            
                        llSay(-8888,(string)llGetOwner()+"texture ok");
                    }
                }
            }
            else if(channel == Gchan)
            {
                if(Gsev < 6)
                {
                    tname = llGetObjectName();
                    llSetObjectName(gagname);
                    llSleep(0.1);
                    llSay(0,mumble(message));
                    llSetObjectName(tname);  
                }
            }
            @lbreak;   
        }
        
        touch_start(integer num)
        {
            do
            {
                num--;
                llSay(Cchan,"Touch "+(string)llDetectedKey(num));
            }
            while(num > 0);
        }

        run_time_permissions(integer perms)
        {
            if(perms & (PERMISSION_TRIGGER_ANIMATION))
            {
                Flags = Flags | 16;
                animateMouth();
            }
        }
        
        link_message(integer link, integer num, string mes, key id)
        {
            if (llGetSubString (mes,0,10) == "NewGagName ") gagname = llGetSubString (mes,11,-1);
            llWhisper(0, "New Gagname set for " + llGetDisplayName(llGetOwner()));
        }

        timer()
        {
            if(openMouth) // attempt to keep mouth open.
                animateMouth();
            
            if(Flags & 64)
                jump tbreak;
            
            
            
            if(replytime > 0)
            {
                replytime--;
                
                if(replytime == 0)
                {
                    
                    if(posstarget != NULL_KEY && cofflelist != [])
                    {
                        if(~llListFindList(cofflelist,["bcollar"]))
                            Particles("reins",1,llList2Key(cofflelist,(llListFindList(cofflelist,["bcollar"]) + 1)));
                        else if(~llListFindList(cofflelist,["bbelt"]))
                            Particles("reins",1,llList2Key(cofflelist,(llListFindList(cofflelist,["bbelt"]) + 1)));
                        else if(~llListFindList(cofflelist,["back"]))
                            Particles("reins",1,llList2Key(cofflelist,(llListFindList(cofflelist,["back"]) + 1)));
                        else if(~llListFindList(cofflelist,["fbelt"]))
                            Particles("reins",1,llList2Key(cofflelist,(llListFindList(cofflelist,["fbelt"]) + 1)));
                        else if(~llListFindList(cofflelist,["collar"]))
                            Particles("reins",1,llList2Key(cofflelist,(llListFindList(cofflelist,["collar"]) + 1)));
                        else if(~llListFindList(cofflelist,["pelvis"]))
                            Particles("reins",1,llList2Key(cofflelist,(llListFindList(cofflelist,["pelvis"]) + 1)));
                        else
                        {
                            llSay(Cchan,"Reins Coffle FAIL "+ (string)posstarget);
                            posstarget = NULL_KEY;
                        }
                        
                        if(posstarget != NULL_KEY)
                            llSay(Cchan,"Reins Coffle OK "+ (string)posstarget);
                    }
                    
                    poster = NULL_KEY;
                    posstarget = NULL_KEY;   
                }
            }
            
            
            if(Flags & 4 && Flags & 1 && Gsev > 0)
            {
                if(llGetUnixTime() - lastchanneltime > 600 && lastchanneltime > 0)
                {
                    lastchanneltime = llGetUnixTime();
                    llOwnerSay("@redirchat:"+(string)Gchan+"=rem,rediremote:"+(string)Gchan+"=rem");
                    Gchan = 3;
                    llOwnerSay("@redirchat:"+(string)Gchan+"=add,rediremote:"+(string)Gchan+"=add");
                    llListenRemove(GListen);
                    GListen = llListen(Gchan, "", llGetOwner(), "");
                }
            }
            
            
            if(Flags & 32)
            {
                Flags = Flags ^ 32;
                llSay(Cchan,"BitQuery");
            }
            
            @tbreak;
        }
    }

     

     

  17. Hello there.

    I have a nice OLD script that I adapted for a muzzle. I had to have it trigger a looped animation to keep my mouth closed when muzzled. That works well enough, except sometimes when I stand from things, the animation seems to have been stopped. Not overridden, stopped completely. I don't see it listed among the playing animations when I bring up the list.

    Is there some little thing I can add to make the script, I don't know, restart the animation periodically? What's weird is as far as I can tell, the animation to keep my mouth open (for things like a ball gag) DOESN'T get canceled in this manner. So I'm not sure why one does, but not the other. Both are the same priority.

    I'm gonna add a comment with the full script pasted. It's a bit long, so fair warning. Otherwise, I'm open to ideas.

×
×
  • Create New...