If you make something like a chest of drawers. in which the drawers have linked parts, is there something that can be done with a script that would keep things together while the chest is moved from place to place?
Thanks Mod
These forums are CLOSED. Please visit the new forums HERE
Kepping parts together |
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
01-26-2006 13:02
If you make something like a chest of drawers. in which the drawers have linked parts, is there something that can be done with a script that would keep things together while the chest is moved from place to place?
Thanks Mod |
Troy Vogel
Marginal Prof. of ZOMG!
![]() Join date: 16 Aug 2004
Posts: 478
|
ditto... please help
01-26-2006 13:23
I have this same problem with a house appliance I am working on. There are already parts of the build that are linked together and need to stay as such for correct behavior. But when I have to move the item, it is a pain in the neck because some parts of the build may not be selected etc.
A possible solution that came to my mind was dropping a little script inside each of the components that check its position with respect to some UBER root prim that I define -- so even if I move only the root prim, the rest of the pieces would follow it and take their correct positions with respect to the root prim in a second or so. Is that just overkill? We're talking about roughly 65 prims total in less than a roughly 1x1x1 space. (yes I know, what was I thinking? Most of my future clients will have to forego the house and just have the appliance. LOL) Thanks in advance, Troy _____________________
![]() |
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
01-26-2006 18:14
You have at least two options. First, as mentioned above, a script into every prim that needs to move. The second option, unlink and relink each time the drawer opens/closes.
I've used both methods. But the best solution is to use a single functioning prim. If it needs details such as knobs or windows, do those with a texture instead of extra prims. |
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
01-27-2006 01:32
and throw a vote or two at Prop 607:Hierarchical Linking so that we can do this easily in the future.
|
Tobor Mounier
Registered User
Join date: 2 Nov 2005
Posts: 4
|
01-27-2006 09:48
I have a main object(linked prims) and place the other linked objects in it's inv.
Create the complete thing with all the sub objects in place and drop a script in each that detects the parent (by name) and works out the vector offset - then delete the sub objects. In your main object have a script that rezes the inventory parts (using the offsets the previous script calculates). Have a touch event (for owner only) with a 'set' option to start the rezzing. set the next touch event to offer a 'move' option - it'll then 'tell' the other objects to die, and you can move the main object. It's up to you how you deal with the communication between the objects - you can have a listen event (5 secs?) in the children, but you may not want this as they will be ticking over continually. You may want to look into getting the sub objects to 'tell' the main one their keys so it can link to them and tell em to die.. You could then turn the listens off when it's all set and the info passed. The option to link/unlink when ever the sub objects move is better cpu wise, but could be a pain to implement if you have sub objects with lots of prims ( i'm not sure about linking / unlinking whole sets..). Find me in world as can show you a few things that work this way - our group has a working 'water mill' that rezzes all it's working bits on/off on demand that may be a good example for you.. |