Jump to content

Connecting animated object to static object


PrincessTali
 Share

You are about to reply to a thread that has been inactive for 668 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So, I am newer to building/creating and want to attach an animated object to a static object without the script from the animated object making the static object move.

How can I do this? I've search a couple hours now and can't find information that is direct and to the point. Any help appreciated.

~Tali~

“The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.” – Winston Churchill

Link to comment
Share on other sites

  • 3 weeks later...

So the item I want to attach is a cylinder prim that has a transparent texture to mimic a school of fish. I put in a FP rotate script that I got off MP. I tried attaching it to FP coral display I put together to create the look of fish swimming around the corals. The problem is when I attach my rotating school of fish (by linking the two objects)the corals also start spinning. I don't know how to script, but have been able to edit when clear instructions are provided. I even tried putting a stop script in the corals so they did not start rotating, but that stopped everything. sighs...

Link to comment
Share on other sites

Maybe just animating the fish texture rather than the whole prim would work here.

llSetTextureAnim/llSetLinkTextureAnim

It's a one-liner, so...

default
{
    state_entry ()
    {
        llSetTextureAnim (ANIM_ON | SMOOTH | LOOP, 1, 1, 1, 1.0, 1.0, 0.1);
    }

}

Drop the script into the fish cylinder. Adjust the 0.1 value, the last in the function call, to change the speed. Negate it to change the direction.

Texture animation is a prim property, so you can delete the script when you're happy with the result and the effect will be maintained.

Edited by KT Kingsley
Link to comment
Share on other sites

KT I did change the script, but the problem remained the same. However I did find from following the links that it had to be attached to the root prim not linked which helped. and now I have another issue with the jelly fish going up and down not working properly even when I followed the same steps....gahhh lol Thanks to you both ~Tali

Link to comment
Share on other sites

If you drop this in the cylinder, it should rotate only the cylinder?
default
{
    state_entry()
    { llSetLinkPrimitiveParamsFast(LINK_THIS, [
       PRIM_OMEGA ,<0.0, 0.0, 1.0>*llGetRot(), 0.1, 0.01 ]);       
    }
}

you may need to stop the spin in the root, if that is where your spin is coming from?

just add this line to state entry in the root:  llTargetOmega(ZERO_VECTOR, 0, 0);

Edited by Xiija
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 668 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...