Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Workaround/bug fix to stop llTargetOmega?

Allegory Malaprop
Mad Scientist
Join date: 8 Jul 2005
Posts: 15
08-14-2007 14:15
I'm running straight into a wall with the bug where llTargetOmega won't stop.

Setting the spinrate to 0.0 doesn't do anything (in testing, I can't change the rate, period, increasing it makes no change as well). Forcing the viewer to pay attention with llSetText/llSetAlpha doesn't do anything either. llResetScript doesn't help, although I can get it to stop by actually hitting the reset script button, albeit only sometimes. It's a child prim in an attachment, and putting the script in before linking it doesn't help. I've tried every workaround I can find, and I'm tearing my hair out, can anyone walk me through a way that will actually make it stop?

In specific- my parent prim sends out a link message to the child telling it to start or stop. The child has the receiver and the llTargetOmega commands. This is to be an attachment. Currently I can get it to start perfectly fine, but then it plugs away in that state and won't listen to any changes to it.
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
08-14-2007 14:48
you sure its not just a script error?

Also you might be setting the gain to 0 with your stop command, I think the gain must be >0 for the command to be accepted (or something like that).
Allegory Malaprop
Mad Scientist
Join date: 8 Jul 2005
Posts: 15
08-14-2007 16:26
It isn't a script error, I can get any other information to pass through flawlessly. Gain is 1 in all calls. The client does not pay attention to the fact that llTargetOmega has been changed, and I am unable to force it to update.

Related posts, whose workarounds do not work for me:

/54/c6/185468/1.html
/54/73/79278/1.html
Simil Miles
Creator
Join date: 1 Mar 2007
Posts: 300
08-15-2007 06:52
The prim or script might be corrupt, try recreating them.
_____________________
UnConWTech @ Flo (144, 84, 224) http://unconwtech.free.fr

SL books http://astore.amazon.com/secondlife-sl-20/

Need a beta tester for quality assurance ?
Need a translator for English, French, Spanish ?
Dina Vanalten
Registered User
Join date: 24 Dec 2006
Posts: 268
08-15-2007 07:25
// Stop spinning
llTargetOmega(<0,0,0>,0,0.0);

works for me.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
08-15-2007 08:50
Al isn't crazy; I've seen the same problem. However, I didn't try using a gain of zero.
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
08-15-2007 09:27
heyas;

i saw the non-stopping lltargetomega bug on the jira.... and i had noticed this week that my method of writing/dropping/compiling the script in a non-linked prim prior to linking -- just doesn't do squat any more.

so i suspect somebody actually worked on that bug. and, uh, made the function more consistently not work?

i will have to check my previous examples that had actually been working (yes, starting/stopping/speed changing attachments).

al, feel free to pester me ingame with ims to remind me to do it.
_____________________
Why Johnny Can't Rotate:
http://forums.secondlife.com/showthread.php?t=94705
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
08-15-2007 09:38
Do you only see this in laggy sims?

Since target omega is a prim property (like particles/text/etc) I wonder if this is related to the build weirdness you get on laggy sims. Like when you edit something and 5 seconds later it snaps back to the pre-edit values..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-15-2007 09:58
Yes, llTargetOmega is seriously borked. I've never gotten any of the stated workarounds to work, and I even just built another spinny-ring thing last night to verify that it was still hosed.

If it is dropped in the root prim, you CAN stop it, but you cannot rotate the prim via script anymore (ie, no more llSetRot()).

If it is dropped into a child prim, you get random effects, but most often, you cannot stop it, llSetRot also doesn't work, and sometimes you can't even start it.

It is a well-known and oft-lamented bug in the simulator. It just fails totally to send updates to the client.

Here is the main JIRA for it: http://jira.secondlife.com/browse/SVC-54

Even though it has an internal assigned case number and Andrew Linden says he is looking into it (as of a few weeks ago, anyway), please vote to get it fixed.
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
08-22-2007 08:22
allegory, and whoever wanted an updated test results on it....

i posted my latest test results to the jira entry.

i cant recite them off the top of my head, but they were slightly different than my previous results.
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
10-08-2007 14:30
bump...

Have the same problem as the OP, and have voted on this issue:
http://jira.secondlife.com/browse/SVC-54

I also haven't had much joy from the 'workarounds' (they appear to 'work' randomly or intermittently ~ just when you think it's been solved, get thrown another curve!)

...so was wondering if anyone has yet discovered some solution they'd like to share...

XxX
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-08-2007 15:06
From: Debbie Trilling

I also haven't had much joy from the 'workarounds' (they appear to 'work' randomly or intermittently ~ just when you think it's been solved, get thrown another curve!)

...so was wondering if anyone has yet discovered some solution they'd like to share...

XxX


You hit the nail on the head with your statement before your enquiry. There is no solution that works all the time or even most of the time.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Insomniac Lunasea
Registered User
Join date: 5 Nov 2007
Posts: 8
12-09-2007 22:27
From: Jesse Barnett
You hit the nail on the head with your statement before your enquiry. There is no solution that works all the time or even most of the time.


Hi, the following work-around seems to work consistently, perhaps it is useful to someone..
Please give any suggestions if there's a better way to do things, i'm not really a programmer..

The end result is:

Omega rotation starts and stops consistently, and upon stopping, the prim resets itself to default rotation (pre-omega).

things to note:

- handle all llTargetOmega calls in a separate script and invoke with link messages.

- to stop omega rotation, just reset this script, since omega rotation seems linked to the script that called it in the first place

- if the script is in a child-prim, it seems necessary to reset the prim rotation also when resetting the omega script

- to set the rotation successfully after an omega call has been made it is necessary to first offset the rotation from the current rotation

- omega script must be deleted and re-copied into any freshly linked child prim, or it wont work.

in this instance, i'm reseting rotation for root prim also but dont think its necessary

<start main script>

// LINK PROTOCOL
integer ROT_START = -100;
integer ROT_STOP = -101;

integer ON = FALSE;


default
{
state_entry()
{
llSetText("",<1.0,1.0,1.0>,1.0);
}

touch_start(integer total_number)
{

if (!ON)
{
llMessageLinked(LINK_THIS,ROT_START,"",NULL_KEY);
}
else
{
llMessageLinked(LINK_THIS,ROT_STOP,"",NULL_KEY);
}
ON = !ON;
}
}

<end main script>

<start omega script>

// LINK PROTOCOL
integer ROT_START = -100;
integer ROT_STOP = -101;

// if set rot to the current rotation after stopping omega rotation, no update of rot occur
// so slightly offset first from intended rotation
setRotPostOmega(rotation rot)
{
if (llGetLinkNumber() > 1)
{
llSetLocalRot(rot + <0.0,0.0,0.1,1.0>;);
llSleep(0.1);
llSetLocalRot(rot);
}
else
{
llSetRot(rot + <0.0,0.0,0.1,1.0>;);
llSleep(0.1);
llSetRot(rot);
}
}

default
{
state_entry()
{
setRotPostOmega(ZERO_ROTATION);
}

link_message(integer sender_number, integer number, string message, key id)
{
if (number == ROT_START)
{
llTargetOmega(<0.0,0.0,1.0>,1.0,1.0);
}
else if (number == ROT_STOP)
{
llResetScript();
}
}
}

<end omega script>


<EDIT>

one more thing, after taking and rezzing a linked set containing these scripts, the child rotations dont seem to work anymore.. perhaps could make copies of = the omega scripts in the child prims and delete the originals via lsl upon a rez.. will look into this when i have more time