Jump to content
You are about to reply to a thread that has been inactive for 132 days.

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

Recommended Posts

Posted

Hi, I have absolutely zero knowledge of scripting. I'm looking for a script that lets you wear glasses either on your face, or on your head. With saveable position/rotation via menu, perhaps? Would anyone be able to help?

Posted

You can do it the way that I have. Wear two pairs of glasses -- one on my nose and one on my head -- and just choose which one to make transparent.  You could do that with a script, but it's almost as easy to do it manually, especially if you don't plan on flipping back and forth very often.  Why waste time with a script?

Posted

This is roughly how I'd go about a script for that:

// Usage: add script to the root prim of the attachment,
//      adjust the attachment to fit in the 'down' position,
//      then change the size of any linked prim to save the adjustment.
//      (reccommend touching one of the arrows next to the x,y,z axes to bump the size up/down and then back in the other direction)
//      touching the object (can also be done by right-click touch while in build mode) will switch states.
//      adjust the 'up' position in the same manner.

// 3-strided list, name, position, rotation.
list gPositions =
[   "Down", ZERO_VECTOR, ZERO_ROTATION,
    "Up",   ZERO_VECTOR, ZERO_ROTATION
];
integer gPosIndex;
default
{   touch_start(integer total_number)
    {   if(llDetectedKey(0)!=llGetOwner()) return; // accept owner touches only.
        gPosIndex = (gPosIndex+3)%llGetListLength(gPositions);
        llSetPos(llList2Vector(gPositions,gPosIndex+1));
        llSetRot(llList2Rot(gPositions,gPosIndex+2));
        llOwnerSay("Attachment position changed to: '"+llList2String(gPositions,gPosIndex)+"'.");
    }
    changed(integer c)
    {   if(c&CHANGED_SCALE)
        {   gPositions = llListReplaceList(gPositions,[llGetLocalPos(),llGetLocalRot()],gPosIndex+1,gPosIndex+2);
            llOwnerSay("Position parameters changed for '"+llList2String(gPositions,gPosIndex)+"'.");
        }
    }
}

(could change llSetPos/Rot to llSLPPF)

Posted

I don't have a script but if you just want glasses that can be moved up to the head and back (with an animation!), check out this store's glasses.  A bit older but they work just fine!

 

https://marketplace.secondlife.com/en-US/stores/78979/search?utf8=✓&search[category_id]=&search[maturity_level]=GMA&search[keywords]=glasses

My favorites are the scholarly and the checkered glasses.

The menu on touch can move up or down, and there are options for the tilt and various other things.

 

 

You are about to reply to a thread that has been inactive for 132 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
×
×
  • Create New...