|
Jenifer Lovell
Registered User
Join date: 13 Sep 2006
Posts: 8
|
12-14-2007 04:27
Ok, So I've made this silver pocket watch for my friend for christmas. It looks great, it opens and closes when clicked, I came to try it on and I hit a speed bump.
It is in 2 pieces (a back piece attached to a chain, and a hinged front) I cant link it as a complete item because the hinge script wont work then. Is there anyone out there that can tell me if there is any way of making this work? The only thing I can think of short of removing the front piece (which I really dont want to do as its engraved) is attaching each piece to 2 parts of the body that are close to each other, but I cant seem to get the 2 pieces to line up properly.
Any advice is apreciated.
|
|
Locke Cardway
Registered User
Join date: 17 Aug 2006
Posts: 12
|
12-14-2007 04:57
One way to do it would be to employ a form of simple animation based on prim transparency. What you do is you create the watch but with two lids, one in the open position (let's call it Lid-A), one in the closed position (Lid-B). The watch is linked as one object. You'd then script the watch such that when you want the watch closed, the script turns the prims of Lid-A (open lid) 100% transparent and then turns the prims of Lid-B (closed lid) fully opaque. When you want the lid open, you reverse the visibility state and make the open lid visible and the closed lid invisible. Granted, it's not prim-count efficient (but then again it's an attachment) nor does it create a smooth animation but relatively speaking, it's easier to animate since you don't need a complex script that needs to handle things like relative positioning and rotation of child prims and so on... I haven't really endeavoured to learn LSL so I can't give you the precise script to do it but my scripter friends tell me this is fairly easy to do. -L
|
|
Jenifer Lovell
Registered User
Join date: 13 Sep 2006
Posts: 8
|
12-14-2007 05:15
Thank you so much, I never thought of that, I don't even know where to start when it comes to scripting but hopefully I can find one somewhere. Thanks again. 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-14-2007 14:57
assuming your face/lid piece is a single prim (say a cut hollowed sphere) you can use a script to rotate and move it w/o it being a separate piece. I'm too tired to right it, but if you post to scripting tips someone will probably show you the code in short order.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|