Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

"Spazzing" flexi - any way to stop it?

Serenarra Trilling
Registered User
Join date: 14 Oct 2006
Posts: 246
03-15-2007 07:10
I was so proud of myself - I created my first (to me) semi-complex script where I knew what every line does. Of course, something had to go wrong!

Here's the script:
CODE

float second;
default
{

state_entry()
{
llSetTimerEvent(3);
}
timer()
{
if (second < 1)
{
second = (llFrand(2));
llTargetOmega( < 0, 0, 1 >, (llFrand(-0.3)) * PI, .1 );
}
else
{
second = (llFrand(2));
llTargetOmega( < 0, 0, 1 >, (llFrand(0.3)) * PI, .1 );
}
}

}


You can all probably see at a glance that it just does a random, reversing z-axis rotate. It does exactly what I wanted.

The problem occurs with what I'm doing with it - attaching long, thin flexi parts to a tall cylinder. Sometimes it works great, with nice smooth movement. Other times, the flexi pieces look like they are having a seizure, with extremely jerky movements. It seems less with smaller flexi parts, but I wrote the script with large trees in mind.

I know the TargetOmega script is a client-side thing, which is probably where the problem lies, but I just couldn't get smooth movement using other rotation commands. (okay, I didn't really try that hard, but I'd really like to do it this way.) Is this something that can be "fixed" or worked around? Or is it a quirk of flexi, making my idea of pretty dancing trees a pipe dream?

Help would really be appreciated!

Edit: Sorry, didn't know the "php" thing for script windows. Should have read the sticky first!
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
03-15-2007 10:13
Hmmm. The flexi is a client side thing too. What a person sees will all depend on their graphics card.

Perhaps making the flexi part a little stiffer might help.

good luck.
Serenarra Trilling
Registered User
Join date: 14 Oct 2006
Posts: 246
03-16-2007 06:58
Thanks, Lee.

Sadly, stiffer flexi didn't help at all.

From the lack of responses I guess I'm trying to do the impossible. Darn!

Moving flexi could be so nice if it would work right. Guess I'll try to do other things with my little script, and keep learning as I go.
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
03-16-2007 09:19
Using llSetPrimitiveParams PRIM_FLEXIBLE you can alter the flexi settings. In particular the last parameter: vector force, can be used to alter the movement. Vary this force in a timer and you should be able to get a tree-sway effect.