Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Linking Objects

rubiq Campbell
Registered User
Join date: 4 Apr 2006
Posts: 22
05-08-2006 07:04
I have created two object namely object1 and object2. I would like to know how to link them and once they are linked how can I make object2 rotate by touching object1. Please help. My goal is to start building a game soon.
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
05-08-2006 13:32
define object?

If by object you mean linkset . . . you can 'fake" the effect by moving all the prims approx at once, it's laggy, never synchronized, and just plain funky. The reason you have do do that is we do not have hierarchial linking . . . you link two linksets you get one giant linkset, not a link of two diff linksets.

If by object you mean prim, just use llSetPos() and llSetLocalRot() in a script in the individual prim that is not the root. When you move the root it moves the rest of the set, when you move a child using those calls it only moves the child.

edit: just re-read for clarity ... lets assume you mean prim (the idea is the same, just need more child scripts when it's linkset)

in object 1 you need a script that has a touch_start() event. In that event call a llMessageLinked() to the LINK_SET ... that's all you want the script to do.

In the child prim you need a script that has a link_message() event . .. check to make sure it's the correct message (in case you ever have more scripts in there) and if so make the llSetLocalRot() call as appropriate.