Jump to content
Sign in to follow this  
PrincessTali

Connecting animated object to static object

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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...