Jump to content

Im Stuck, Awsome Pose Stand Script


scamper2012
 Share

You are about to reply to a thread that has been inactive for 4352 days.

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

Recommended Posts

I have been building an awsome pose stand script for my store and to give away in all our builds.

the pose stand itself is about 7 prims in total and the texture can be changed just by dropping a texture into the pose stands contents. however, because the pose stand script is not in the root prim but in one of the child prims, im getting an error when trying to call the objects description of the root prim. can someone help me please.

Script Below...

 

key avposekey = NULL_KEY;
integer avposeperms = FALSE;
string text;

default
{
    state_entry()
    {
        vector pposetarget = <0.00, 0.00, 1.00>;
        rotation rX;
        rotation rY;
        rotation rZ;
        rotation r;
        rX = llAxisAngle2Rot( <1,0,0>, 0 * DEG_TO_RAD);
        rY = llAxisAngle2Rot( <0,1,0>, 0 * DEG_TO_RAD);
        rZ = llAxisAngle2Rot( <0,0,1>, 0 * DEG_TO_RAD);
        r = rX * rY * rZ;
        
        llSetSitText( "Pose" );
        llSitTarget( pposetarget, r );
        llSetText("", <1.0,1.0,1.0>, 1.0);
         
    }
   
    changed(integer change)
    {
        if (change & CHANGED_LINK)
        {
            key agent = llAvatarOnSitTarget();
            if ( avposekey == NULL_KEY && agent != NULL_KEY )
            {
                avposekey = agent;
                llRequestPermissions(avposekey,PERMISSION_TRIGGER_ANIMATION);
            }
            else if ( avposekey != NULL_KEY && agent == NULL_KEY)
            {
                if ( avposeperms )
                {
                    llStopAnimation("turn_180");
                    llSetColor(<0,0,0>, ALL_SIDES);

 }

 llResetScript();
 }
 }        
 }

 run_time_permissions(integer parm)
 {
    text = llGetPrimitiveParams(LINK_ROOT, llGetObjectDesc());
 if(parm == PERMISSION_TRIGGER_ANIMATION)
 {

 llInstantMessage(avposekey,"Hello " + llKey2Name(avposekey) + " " + text);
 


 avposeperms = TRUE;


 llStopAnimation("sit");

 llStartAnimation("turn_180");
 
 llSetColor(<0.0, 0.0, 0.8>, ALL_SIDES);
 }

 }    
}

 

Link to comment
Share on other sites

I'm not sure you have this exactly where you want it in the script, but I guess it will work there, changed to something like:

text = llList2String(llGetLinkPrimitiveParams(LINK_ROOT, [PRIM_DESC]), 0);

Just now I can't check to see if this is even syntactically correct, but hoping it will point in the right direction.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4352 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
 Share

×
×
  • Create New...