/waves
back again XD; you guys're love and though you may not want it, when I finish and get this sucker correct, I'll give ye helpers one for freeee because it's cute :3 and we all like cute things >3>
error: as you can see in the picture, I spent a good while fixing the closed and open features on the locket. It looked good, so I went ahead and attached it to my avatar... when I did, the "close" function went all wonky. What could be the problem for this?
-----
//paste the postion(vec) and rotation(rot) from 'touch local rot pos' script
// below for closed and open postions
vector close_vec = <-0.0045, 0.0001, .0007>;
rotation close_rot = <0, 5, 0.09, 5>;
vector open_vec = <-0.023, 0.00001, 0.022>;
rotation open_rot = <-0.00023, 20, 0.00019, 0.1>;
//vehicle door by rickard roentge
integer open;
rotation Inverse(rotation r)
{
r.x = -r.x;
r.y = -r.y;
r.z = -r.z;
return r;
}
default
{
state_entry()
{
open = FALSE;
}
link_message(integer sender, integer num, string str, key id)
{
if(str=="CloseLid"

{
if (open) {
open = FALSE;
llSetPrimitiveParams([PRIM_POSITION, close_vec, PRIM_ROTATION,
close_rot * Inverse(Inverse(llGetLocalRot())*llGetRot())]);
}
} else if(str=="OpenLid"
{if(!open) {
open = TRUE;
llSetPrimitiveParams([PRIM_POSITION, open_vec, PRIM_ROTATION,
open_rot * Inverse(Inverse(llGetLocalRot())*llGetRot())]);
}
}
}
}
-----
I'm guessing somewhere in "if(str=="CloseLid"
" lies the problem, but I honestly couldn't say ^_^;