Touch Texture Setter ( V3 )

Written by: Headmaster

Fill out the UUID for the texture to set. Drop the script in the root prim of the object to texture. The texture then sets on each face touched. A long held touch will delete the script.

 

// V3 //
 
key texture_uuid = "f05755e7-d31c-116d-9cf2-a4840bdfc56b"; // Fence texture
 
integer tc;
 
key owner;
 
default
{
    state_entry()
    {
        owner = llGetOwner();
    }
    touch_end(integer nd)
    {
        while(nd)
        {
            if(llDetectedKey(--nd) == owner)
            {
                tc = 0;
                llSetLinkTexture(llDetectedLinkNumber(nd), texture_uuid, llDetectedTouchFace(nd));
            }
        }
    }
    touch(integer nd)
    {
        while(nd)
        {
            if(llDetectedKey(--nd) == owner)
            {
                if((++tc) == 20)
                llRemoveInventory(llGetScriptName());
            }
        }
    }
}

 

Category: