Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPos fail?

Nezu Garside
Custom titles are too sho
Join date: 12 Mar 2008
Posts: 40
10-09-2009 10:36
I have written a script that is designed to set a new ROT and POS for an attachment on my body when a button on a HUD is clicked. However, when I click the button, the llSetPos() code doesn't come into affect until I right click on the attachment in question. Anyone know what's going on?

if(channel == -999 && llGetOwnerKey(id) == llGetOwner())
{
if(message == "rightDown";)
{
//rLop Rot
vector rottoset = <105.50, 4.60, 277.20>;
rottoset=rottoset*DEG_TO_RAD;
llSetRot(llEuler2Rot(rottoset));
llSetPos(<.014, -.056, .111>;);
posStart = <.014, -.056, .111>; //Attempted patch piece. See below
}
}

I've also tried making a patch using the changed(int change) event with no such luck.

changed(integer change)
{
if(change)
{
llSetPos(posStart);
}
}
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
10-09-2009 13:31
It's really moving, but there has been a bug for a while where the viewers don't notice. When you right click, that forces an update.

http://jira.secondlife.com/browse/SVC-1945

As noted in that bug, you can often work around the problem with a kludge like:

llSetText((string)llFrand(1), ZERO_VECTOR, 0);

That is an attmpt to get the script to force an update.
Serries Celestalis
Registered User
Join date: 9 Oct 2009
Posts: 0
10-10-2009 06:27
I see. Thanks, gonna go give that a try.