Bolkral Steerpike Posted March 8, 2013 Share Posted March 8, 2013 I’ve been searching around everywhere so if there’s another thread on this somewhere, I apologize. :( I’m looking for a script for a double door which consists of 2 separate prims (both have a root prim to rotate on the correct axis). I have the scripts to make any single door open, but my goal is that when one of the doors is clicked, both will open in unison. Of course the real trick is getting this, while also ensuring that the opening/closing of the door is smooth as this is for a build I’m working on. The only three things that I need in this script:Click to open/closeTimer to automatically close after a defined period of timeSmooth opening/closing Thanks to all those who help! Link to comment Share on other sites More sharing options...
Innula Zenovka Posted March 8, 2013 Share Posted March 8, 2013 Are you sure that you need the root prims to make the doors rotate correctly? Can this not be done either by path-cutting the doors themselves (see Void Singer's example) or, if you can't do that, by offsetting the axis as explained here? That way, you can have whichever door is touched send a link message to the whole linkset and have both doors open when they receive the message. Otherwise, if you have to have doors that are separate from the rest of the linkset and from each other, you would have to have the touched door say something and (since it won't be able to hear messages from itself) have a third prim hear the message and then tell both doors to open. Either way, the best way to get double doors to work together is to have the touched door send some sort of messsage that both it and the other door will receive simultaneously, and have them both open when they receive it. Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 8, 2013 Share Posted March 8, 2013 You can create smooth opening doors in at least two popular ways. One is to use a combination of llSetRot (or llSetLinkPrimitiveParamsFast) and llTargetOmega, in the fashion of Toy Wylie's Smooth Rotating Door script in the LSL wiki library. The other is to use llSetKeyframedMotion. Either method will give you a reasonably smooth rotation once you have messed with its parameters. Wylie's approach can be adapted to make double doors if you use each door to send a linked message to the other one as a trigger. That way, touching either door opens both. In practice, unfortunately, I have found that if either door gets out of sync for some reason --- it always seems to happen sometime --- then it's difficult to get them both rotating the proper direction again. At least, it would be difficult for the average non-scripter customer to do. I have had more trouble-free luck with keyframed motion on double doors. The only challenge there is that llSetKeyframedMotion cannot be applied to part of a linkset. It works on all or nothing, so you cannot link your double doors to the rest of the build or to each other. My solution to that problem is to place a rezzer in the door frame that creates a new pair of doors when the building is rezzed or moved. Touching or colliding with either door sends a triggering chat message to the other door, so that both open at once. Link to comment Share on other sites More sharing options...
Bolkral Steerpike Posted March 14, 2013 Author Share Posted March 14, 2013 Thanks for the help, figured it out! Link to comment Share on other sites More sharing options...
Recommended Posts
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