Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LLSetPos???

Rebecca Naidoo
Registered User
Join date: 28 May 2008
Posts: 82
07-12-2008 10:47
llSetPos has stopped working to certain coordinates, the prim i want to move is inside an object?

any ideas why this has happend?
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
07-12-2008 10:50
Are you trying to move it more than 10m away?
Rebecca Naidoo
Registered User
Join date: 28 May 2008
Posts: 82
07-12-2008 11:01
Nope,

Here is the script, the rotations work but not the position setting:


default
{

link_message(integer sender_num, integer num, string str, key id){

if(str == "2";){

//stage one

llSetPos(<33.44783, 241.48921, 625.24963>;);
llSetLocalRot(<-0.60897, 0.68845, 0.31713, 0.23370>;);

// Stage Two

llSetPos(<33.99472, 241.49185, 626.16754>;);
llSetLocalRot(<-0.67790, 0.72701, 0.10900, 0.00477>;);

}else if(str == "1";){

//stage one

llSetPos(<33.44783, 241.48921, 625.24963>;);
llSetLocalRot(<-0.60897, 0.68845, 0.31713, 0.23370>;);

// stage three

llSetLocalRot(<0.45515, -0.55920, -0.51406, -0.46461>;);
llSetPos(<34.53886, 241.49557, 624.88110>;);


}

}
}
Rebecca Naidoo
Registered User
Join date: 28 May 2008
Posts: 82
07-12-2008 11:23
Even weirder it works in another group of prims set to object, but not the one i need it to.
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
07-12-2008 11:37
Nothing jumps out at me as being overly wrong, though you seem to be missing an 'if' on stage three.

If I had to guess, I'd still guess that you're trying to move the prim to far. Either more than 10m or, if this is a non-root prim, to some position outside the valid range for linking.

Instead of giving absolute positions to llSetPos, it's usually safer to give relative ones. Like, if you want to move up 1m, do llSetPos (llGetPos() + <0.0, 0.0, 1.0>;);. Maybe give that a try?
Rebecca Naidoo
Registered User
Join date: 28 May 2008
Posts: 82
07-12-2008 12:14
Tryed and failed, did not work :(, im pritty sure it's within range.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
07-12-2008 13:25
You might want to throw in some temporary chatter in your script, just have it say the actual positions back to you. Viewer bugs aren't unheard of, so it's worthwhile to confirm that your script is really broken :o

I did notice some new weirdness with child prim positioning in the 1.23 server, but they rolled it back to 1.22 before I could figure out if it was a problem that would affect normal uses (and everything seemed fine on beta, didn't try every possibility, bah). Has your sim been successfully rolled back to 1.22.4, if it was even bumped up to 1.23 this week?
_____________________
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
07-12-2008 15:31
Actually looking at that script again, there is llSetLocalRot on some lines and what looks like region coordinates in the llSetPos. Is this a standalone (or root) prim, or is is a child in a link set? For children you need to make the coordinates relative to the root.
_____________________
Rebecca Naidoo
Registered User
Join date: 28 May 2008
Posts: 82
07-13-2008 02:17
Thank you! solved.