Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llTargetOmega() and attachment woes.

Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
11-01-2006 18:27
I've made a little radar dish that uses llTargetOmega to smoothly rotate. Preiodically it reverses the direction of rotation, and can be told to stop - all done with llTargetOmega.

The whole things works perfecly when sitting on the ground. I can start and stop it, pick it up and re-rez it without any troubles.

If I attach it it will work fine, until I detach it or teleport or probably a few other things. Once that happens it will never work again until I recompile the script; it just ignores any llTargetOmega calls. Normally the attachemnt keeps slowly rotating on whatever llTargetOmega rotation it was on when it broke.

Only the script with llTarget Omega needs to be recompiled; I moved that command into it's own script and can just recompile that, not the control script. A recompile is required; llResetScript() will work. I think this is a manifestation of bug SL-13443 but I can't see any workaround listed for that.

Clearly recompiling the script every time I teleport or change outfits is not a very practical workaround. I know of one attachemnt that has a "fix" command that resolves the problem (Anisa's Neko Tail) so it can be done if I can just figure out how... does anyone have any advice or tips to offer?
Kitsu Nico
Registered User
Join date: 2 Jul 2005
Posts: 11
Head banging
12-07-2006 04:14
I am having the same issue, and a workaround has been very elusive.
If such a script is compiled while sitting, standing will cause llTargetOmega to 'jam'

If you attempt an llSetRot while it is 'jammed', movement will show while the object is highlighted and being edited, but will otherwise not show in world.

Following bug demo is supposed to rotate on Z by a small amount every 3 seconds for 1 second, then stop. If teleport while the object is attached, the object will either start rotating continuously and failing to stop, or fail to rotate and be unmovable barring a complete recompile. If you recompile while sitting, it will work until you stand. If you recompile while standing, it will work until you sit or teleport or cross regions.

If you make 2 copies of the test object, and wear one, and break it, the second copy will break as well, even if it has not been worn before.

Velocity Interpolate Objects is on.

CODE

default
{
state_entry()
{
llSetTimerEvent(3.0);
}

timer(){
llTargetOmega(<0,0,1>,PI/18,1.0); //arbitrary rotation
llSleep(1.0);
llTargetOmega(<0,0,0>,0.0,0.0);

}
}



The only solution is a recompile, and it is impossible to ask people to have to recompile scripts everytime they attach, sit, stand, teleport, walk across sim borders, etc.

These all come under changed or attach events but I do not have the insight into what goes on behind the scenes, to have any idea what to use that would actually clear this.

The following does not seem to help neither:
llResetScript.
llResetOtherScript called by another script.
llRemoteScriptLoadPin/llRemoteScriptPin combination to wholly replace the problematic script.
Detaching-reattaching.

Even tried random inventory functions.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
12-07-2006 04:31
Please report this bug. It has been aroud forever and will never be fixed

the work around till then is to use a llSetText after every llTargetOmega call. just set the text alpha to 0. This should fix your problem.

other things that casue llTargetOmega to stop working. have a script that stops and start the rotation. copy the the prim. then new copy will not work unless you recomplie it as well.
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
12-07-2006 04:42
From: Gearsawe Stonecutter
Please report this bug. It has been aroud forever and will never be fixed

the work around till then is to use a llSetText after every llTargetOmega call. just set the text alpha to 0. This should fix your problem.

other things that casue llTargetOmega to stop working. have a script that stops and start the rotation. copy the the prim. then new copy will not work unless you recomplie it as well.


Clever! Of all the things I tried I didn't think of using llSetText to force an object update. I'll have to try and code it up this weekend.

Now we just hope that LL don't improve the efficency of llSetText so it doesn't update the entire prim! :-)

[edit] This has been reported, SL-13443, but I have no confidence of this being fixed when there are so many more pressing issues than people having broken radar dishes on their heads. :-)
Kitsu Nico
Registered User
Join date: 2 Jul 2005
Posts: 11
12-07-2006 05:24
Like so? It does seem to fix it... But thank you for replying. Yes, it has been around forever...

CODE


default
{
state_entry()
{
llSetTimerEvent(3.0);
}

timer(){
llTargetOmega(<0,0,1>,PI/18,1.0); //arbitrary rotation
llSetText("iHateSLBugs", <0,0,0>,0.0);
llSleep(1.0);
llTargetOmega(<0,0,0>,0.0,0.0);
llSetText("iHateSLBugs", <0,0,0>,0.0);

}

}
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
12-07-2006 05:31
LL is only hurting them selves. People consider SetText to be Laggy becasue the sim is forced to send an update to everone in range of the object. So we are forced to use it to fix other bugs which cause other problems in the long run.
Kitsu Nico
Registered User
Join date: 2 Jul 2005
Posts: 11
12-07-2006 05:32
I typo'd >.<

I meant that it does not seem to fix it.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
12-07-2006 05:48
Use a different string after each update. like "iHateLSBugs" and "LSBugsSuck". This is somthing I have always done in the past. Now I have not checked all my doors after this update.
Kitsu Nico
Registered User
Join date: 2 Jul 2005
Posts: 11
12-07-2006 08:53
Aaah, thank you!
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-08-2006 03:57
CODE

//Use these two functions instead of TargetOmega & SetText.
//They implement the llSetText hack in such a way that llSetText
//may be used in the script without considerable side effects.
//Both functions parameters are the same as their LL counterparts.
//By: Strife Onizuka

//Default floating text
string sSetText = "";
vector vSetText = <1.0, 1.0, 1.0>;
float fSetText = 1.0;
integer iTargetOmega = FALSE;

TargetOmega(vector a, float b, float c)
{
llTargetOmega(a,b,c);
if((iTargetOmega = !iTargetOmega))
llSetText("\n" + sSetText, vSetText, fSetText);
else
llSetText(sSetText, vSetText, fSetText);
}

SetText(string a, vector b, float c)
{
llSetText(sSetText = a, vSetText = b, fSetText = c);
iTargetOmega = FALSE;
}
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey