Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script Help Needed

Nickolas Goodman
Registered User
Join date: 19 May 2006
Posts: 19
11-10-2006 13:42
Hello All. I have a script I would like to add a sit script to. Can anyone help me or point me in the right direction? Thanks! :)

The following is the original script and the additional sit script needs to be added. It is seperated by the line. The original script works fine.

>

list primdet =[PRIM_TYPE, PRIM_TYPE_TORUS, 0, <0.0, 1.0, 0.0>, 0.94, <0.0, 0.0, 0.0>, <0.65, 0.45, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.60, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0];
list primsize = [PRIM_SIZE,<0.885,0.699,0.699>];
list primrot = [PRIM_ROTATION,<0.00000, 0.70711, 0.00000, 0.70711>];
default
{
state_entry()
{
if(llGetScale() != <0.885,0.699,0.699>;)
{
list newpos = [PRIM_POSITION,llGetPos() + <0,0,0.275>];
llSetPrimitiveParams(primdet + primsize + primrot + newpos);
llRemoveInventory(llGetScriptName());
}
}
}


-------------------------------------------------------------------------------------------------------

vector offset = <.95,.3,-0.4>;
rotation rot = <1,1,1,1>;

default
{
state_entry()
{
llSitTarget(offset,rot);
}

}
}
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
11-10-2006 13:54
Just put the second script in the item?

Not sure is Sit Targets are persistant? but try

CODE

vector offset = <.95,.3,-0.4>;
rotation rot = <1,1,1,1>;
list primdet =[PRIM_TYPE, PRIM_TYPE_TORUS, 0, <0.0, 1.0, 0.0>, 0.94, <0.0, 0.0, 0.0>, <0.65, 0.45, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.60, 0.0>, <0.0, 0.0, 0.0>, 1.0, 0.0, 0.0];
list primsize = [PRIM_SIZE,<0.885,0.699,0.699>];
list primrot = [PRIM_ROTATION,<0.00000, 0.70711, 0.00000, 0.70711>];
default
{
state_entry()
{
if(llGetScale() != <0.885,0.699,0.699>)
{
list newpos = [PRIM_POSITION,llGetPos() + <0,0,0.275>];
llSetPrimitiveParams(primdet + primsize + primrot + newpos);
}
llSitTarget(offset,rot);
llRemoveInventory(llGetScriptName());
}
}
Nickolas Goodman
Registered User
Join date: 19 May 2006
Posts: 19
woot
11-10-2006 18:03
Thanks a bunch Newgate! It worked perfectly. woot woot