Jump to content
Sign in to follow this  
Railyni

Looking for a script that can strip pieces of cloth

Recommended Posts

Hello everyone , i'm aware of mesh clothing being stripable by having a script inside of a prim that triggers it to change the state of the mesh to look from normal , pulled , to full on nude.

however on marketplace i cant find such script that allows me to fully strip my avatar only from default state to nude , not the 3 clothing states ( Default , Pulled , Lifted) .

 

 

for Example ,  https://marketplace.secondlife.com/p/Vanilla-Bae-Lexi-Top-Strip-Me-Collection-Flowers-Group-gift/14583644

THIS IS NON -RLV!

 

16e99021a6706b213707a19cd5395c17.png

Share this post


Link to post
Share on other sites

I guess the script would not sell very well... because once you are into setting up face flipping you might already know enough about scripting to build your own... the "nude" state is just all faces turned to invisible.

  • Like 2

Share this post


Link to post
Share on other sites

would you know how to make the script in general ? ironically i messaged the girl who makes her strip clothing she said she made it herself , im very new to making things in general and i can easily copy and paste a script in a 'new script ' file to make something function

Share this post


Link to post
Share on other sites

this thread has a similar problem as it is from 2012 it might still work or not work anymore, the language changed over time:

 

Edited by Fionalein

Share this post


Link to post
Share on other sites

Am I correct in thinking that you have a mesh item of clothing with three faces, one of which is "default", one of which is "pulled", and one of which is "lifted" and you want to be able to switch between each of these three states, and also have the option to hide the item altogether, as it it's been removed?

If that is the case, then this should do roughly what you want.   

First, you need to identify the face numbers that correspond to  the item's default, pulled and lifted states.  Once you've done that, you need something like this

***WARNING -- NOT TESTED IN WORLD, but it compiles

integer iDefault = 0;//fill in your own values here
integer iPulled = 1;//fill in your own values here
integer iLifted = 2;//fill in your own values here
integer iChannel = 5;//insert your own channel here for the script to listen on
integer iHandle;
list lCommands =["normal","pull",",lift","strip"];//the four command words to which the script should respond; // MUST BE IN lower case!!!
list lFaces; 
list lHidden; 
vector vWhite = <1.0,1.0,1.0>;//change if necessary for whatever colour the object is
default
{
    state_entry()
    {
        lFaces = [iDefault,iPulled,iLifted];//must be in the same order as the commands
        lHidden = [PRIM_COLOR,ALL_SIDES,vWhite,0.0];//all faces should be invisible
        llListenRemove(iHandle);
        iHandle = llListen(iChannel,"",llGetOwner(),"");
    }
    attach(key id)
    {   
        llListenRemove(iHandle);
        if(id){//if the object is attached
            iHandle = llListen(iChannel,"",id,"");//then listen for messages on iChannel from whoever it wearing it
            llSetLinkPrimitiveParamsFast(LINK_THIS, lHidden + //turn all faces invisible
                [PRIM_COLOR,iDefault,vWhite,1.0//except for the default face
                ]);
        }
    }

    listen(integer channel, string name, key id, string message)
    {
        message = llToLower(message);//convert message to lower case, so no need to worry about capitalization
        integer n = llListFindList(lCommands, [message]);//is the message one of the commands to which this script responds?
        //if the item is there, llListFindList returns the index of item for whch you're looking in the list you're searching, starting at 0 for the first item on the list
            //if it's not there, llListFindList returns -1;
        if(~n){ //shorthand for n!= -1 -- that is, the command is an item on the list
            list temp = lHidden; //Begin to construct the instructions for llSetLinkPPFast. Start by hiding all the faces
            if(n < 3){//and it's one of the first three items, so not "strip"
                temp +=[PRIM_COLOR, llList2Integer(lFaces,n),vWhite,1.0];//then make that face visible
            }
            llSetLinkPrimitiveParamsFast(LINK_THIS, temp);//change the faces' transparency 
        }
    }


}

ETA  Normally I don't like posting full scripts but since one of the first scripts I ever wrote (with a great deal of help from some very patient people) was a strip script, so I feel a certain obligation!

Edited by Innula Zenovka
  • Like 5

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...