Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llTargetOmega bug or suppose to work this way.

Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
07-20-2006 16:20
Being able to toggle llTargeOmega on and off after an object has been copied seems to be not work.

CODE

integer i = 0;
default {
touch_start(integer n) {
if (!i){
i = 1;
llSay(DEBUG_CHANNEL, "On");
}
else {
i = 0;
llSay(DEBUG_CHANNEL, "Off");
}
llTargetOmega(<0,0,1>, i, 1);
}
}


Okay now setup a two prim group and put this in the child prim. Now touch the child prim to turn on and off. Now the problem is do a SHIFT drag to make a copy. Now touch the one that was left behind. (make sure you are touching the copied one). It will not work. it still says on off. but will not spin. Here is the wierd part. Have another person Edit and select Edit linked parts. Have him select only the root prim. Now you can touch the child prim again and it seems to work. Once they deselect the root and you click the child to turn it on/off it stops working. Can we say bug? The way to start the script working correctly again is to recompile it, resetting has no effect. Have no Idea why this makes it work again. Also server reset seems to make it stop working.

THis is really causing a major problem in one of my larger scripts and has become rather annoying. Have found no real good work around which does not cause jerky rotation with out using physics.

Sound like a bug to anyone else or is it suppose to work like this?
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
07-20-2006 17:08
That code shouldn't even compile. llTargetOmega takes two parameters, vector force and float tau.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
07-20-2006 23:00
Well it does compile. LSL is one of the most forgiving when it comes to floats vs integers in thier functions but not true when a funtion takes a List for it's input. llTargetOmega take three inputs vector axis, float spinrate, and float gain. so yes it does compile and even if it is all floats it still does not work properly.

CODE

integer i = 0;
default {
touch_start(integer n) {
if (!i){
i = 1;
llSay(DEBUG_CHANNEL, "On");
}
else {
i = 0;
llSay(DEBUG_CHANNEL, "Off");
}
llTargetOmega(<0.0, 0.0, 1.0>, (float)i, 1.0);
}
}


Also found once it is on and not spinning it will start once you Edit linked parts and select only the root prim. You don't have to have some one esle select like I said before.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
07-21-2006 18:26
Well found a hack sort of to get the llTargetOmega to update from the server. Use llSetText right after llTargetOmega to casue server to update the Primgroup effectivly forcing the rotation animation to be resent. Just keep the Alpah to zreo. The draw back it uses more band width due to the updates.