Jump to content

Help required to either "find" or tweak a script


Amaranthim Talon
 Share

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

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

Recommended Posts

I made an animation that requires a prim to open and close like a door and execute the animation at same time- al on touch? Has anyone seen a script like that? I am unsure what to call it so not sure how to look for it and I cannot script so I cannot write it. I did use 3greeneggs.com to make the moving prim part of the script but am absolutely clueless on how I would have it execute the animation part.

Here is what 3greeneggs gave me:

 

// This script was auto-generated by Ann Enigma's script autogenerator
// available at http://www.3greeneggs.com/autoscript/



default
{

    touch_start(integer total_number) {

        llSetPos(llGetPos()+<0,0,.5>);
    }

}

I am guessing if I add : llSetPos(llGetPos()+<0,0,-.5>); It will go back down (am at work so haven't tried it). Now what I want is the part where the animation wd go into effect. I tried looking at the usual poseball script but I am afraid I simply don't know what parts to cut and paste (nor where for that matter!)

I do apologize if this all sounds silly but guys, I don't have much in the way of script knowledge.. And I thank you all for reading.

 

Link to comment
Share on other sites

Can you be a bit more specific about how you want it to work,  Amaranthim?

The basic mechanism is simple enough, particularly if the moving prim is a child prim ; something like

  • use llSetClickAction to seat the avatar on touching the prim, and request animation permissions; 
  • on gaining the permissions, in the run_time_permissions event, start animating the avatar and moving the door; also start a timer
  • in the timer event, close the door and stop the animation

The details, though, might get a bit more complicated, particular if you want the avatar to end up on the other side of the door when standing up after the script has run.

Link to comment
Share on other sites

  • 4 months later...

Hello,

link two prims (cubes, see How to link prims) and add this script:

 

integer open;default{    state_entry()    {        if (llGetNumberOfPrims() < 2)        {            return;        }        llSetLinkPrimitiveParamsFast(1, [PRIM_TYPE, 0,0,<0.000000, 1.000000, 0.000000>,0.900000,<0.000000, 0.000000, 0.000000>,<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>, PRIM_SIZE, <0.500000, 0.500000, 0.500000>]);        llSetLinkPrimitiveParamsFast(2, [PRIM_SIZE, <0.500000, 0.500000, 0.010000>, PRIM_POS_LOCAL, <0.000000, 0.000000, 0.245001>, PRIM_ROT_LOCAL, <0.000000, 0.000000, 0.000000, 1.000000>]);    }    changed(integer change)    {        if (change & CHANGED_LINK)        {            llResetScript();        }       }    touch_start(integer total_number)    {        if (open)        {            open = FALSE;            llSetLinkPrimitiveParamsFast(2, [PRIM_POS_LOCAL, <0.000000, 0.000000, 0.245001>, PRIM_ROT_LOCAL, <0.000000, 0.000000, 0.000000, 1.000000>]);        }        else        {            open = TRUE;            llSetLinkPrimitiveParamsFast(2, [PRIM_POS_LOCAL, <-0.178574, 0.000000, 0.500004>, PRIM_ROT_LOCAL, <0.000000, -0.634393, 0.000000, 0.773010>]);        }    }}

 

Link to comment
Share on other sites

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