Jump to content

Linking moving and stationary prims


Dane Restout
 Share

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

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

Recommended Posts

I created a prim and put a script for movement in the contents tab.   I linked another prim to it that has no scripts in it.  Those 2 linked prims move together as I want them too.   I want to link those 2 to another stationery prim.  When I do the entire 3 either move together or stop entirely, depending on which I link last.  Is there a way to make the stationery prim not move with the others linked to it?

I really have very little knowledge of scripting other than buying one to use in a build.  I much appreciate any help you can give!

Link to comment
Share on other sites

Yes, your script will need to address the specific child prims that are supposed to move, using

llSetLinkPrimitiveParamsFast(link_number,[ PRIM_POS_LOCAL,your_movement_vector_goes_here]);

If you have done it properly, and if the script is in the root prim, you should be able to touch anywhere in the linkset and watch the correct child prims move.  Notice that I have said "child prims."  You cannot move the root prim independently in this way.  When you do, the entire linkset will move.  If that's a concern, you can beat it in either of two ways: (1) by relinking things to make some other prim the root or (2) by moving the entire linkset with your script and then quickly moving everything but the root prim back where they were.  That second option is more work (and clumsier) than the first.

Link to comment
Share on other sites

Thank you Rolig.  I've read a lot about scripting (here), and tried my hand recently at simple scripts, along with changing some that work for me, but I really don't have enough knowledge (yet) to even know where to add that string to the existing script I'm using.  Sorry for my ignorance but I'm trying to learn as I go. I appreciate your info.  I'll keep reading and trying to figure this out.  Once again, thanks.

Link to comment
Share on other sites

Oh boy I really need help here.  I've been reading and trying to get this to work but am having no luck at all.  I really have no idea where this line "llSetLinkPrimitiveParamsFast(link_number,[ PRIM_POS_LOCAL,your_movement_vector_goes_here]);" goes within the script and also where I get this part "your_movement_vector_goes_here".  Please excuse my ignorance and help a guy out.  I'm becoming very frustrated. 

Link to comment
Share on other sites

In terms of overall logic, it will need to go wherever you currently have code to set a prim's position.  In terms of syntax, you will have to restructure the script to identify each child prim properly, get its current position, and then be prepared to move it.  This will require setting up some commands in loops.  And if you will not always be moving the same child prims, it will mean setting up a dialog menu to control the right ones.  Not a trivial job but not a simple one for a non-scripter.

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...