Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetRot and llTargetOmega

Moon Corrigible
Registered User
Join date: 19 Jan 2007
Posts: 75
03-24-2008 00:09
I have absolutely no clue what I am doing wrong. I honestly thought I had a half of a grip on this whole scripting thing .. but obviously I was wrong.

So I'm trying to put pedals on a bicycle. I know, I know, bad plan to start with. But I'm honestly not all that picky! I've got the timing of the llTargetOmega synced up with the animation enough that I'm happy with it. I dont care where on the circle it is when they stop, because they will stop pedaling at a random time. All I want is a simple llSetRot back to the original position when I turn it off. I'm fine with jumping or jerking or doing the watoosi, as long as it gets there. But instead it just seems to stop wherever the llTargetOmega had it stop and do nothing else. I've poked at it and pulled at it and boiled it down to a touch_start to try to get it to work - here's that version

CODE
 integer SWITCH;
rotation STARTROT;

default
{
on_rez(integer startparam)
{
SWITCH = FALSE;
STARTROT = llGetRot();
}
touch_start(integer total)
{
if(SWITCH == FALSE)
{
llTargetOmega(llRot2Left(STARTROT), TWO_PI, 1.0);
SWITCH = TRUE;
}
else if (SWITCH == TRUE)
{
llTargetOmega(llRot2Left(STARTROT), 0.0, 1.0);
SWITCH = FALSE;
llSetRot(STARTROT);
}
}
}


Thanks so much in advance!
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
03-24-2008 01:50
Your clue is on the Second Life Issues.
https://jira.secondlife.com/browse/MISC-471
_____________________
:) Seagel Neville :)
Moon Corrigible
Registered User
Join date: 19 Jan 2007
Posts: 75
Whew!
03-24-2008 06:52
Yes! My tenuous grip on reality holds true! The dancing bears will be so pleased!