Tattooshop Posted September 21, 2021 Share Posted September 21, 2021 Hey! I am trying to convert a script for one door to a script for double doors so that when you click on any of them, they open at the same time. The frame is the root and the script itself is placed in it. You need to click on the doors themselves. That's what is used for opening and closing: llSetLinkPrimitiveParamsFast(DOOR_PRIM_1, [PRIM_ROT_LOCAL, gRotationClosed, PRIM_POS_LOCAL, gPositionClosed]); llSetLinkPrimitiveParamsFast(DOOR_PRIM_2, [PRIM_ROT_LOCAL, gRotationClosed, PRIM_POS_LOCAL, gPositionClosed]); ... some stuff ... llSetLinkPrimitiveParamsFast(DOOR_PRIM_1, [PRIM_ROT_LOCAL, rotationOpened, PRIM_POS_LOCAL, positionOpened]); llSetLinkPrimitiveParamsFast(DOOR_PRIM_2, [PRIM_ROT_LOCAL, rotationOpened, PRIM_POS_LOCAL, positionOpened]); How do I get a negative value applied to the second door? I don't want to duplicate the entire script! The logic is not entirely clear. Maybe there is another way? 🤔 Thank's for any help! Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 21, 2021 Share Posted September 21, 2021 Start here ... You can adapt that approach to your favorite method of opening a door. 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted September 21, 2021 Share Posted September 21, 2021 (edited) The inverse of a vector (v) is -v; the inverse of a rotation (r) is ZERO_ROTATION/r (or if you want to be clever, invert a rotation with r.s=-r.s) to mirror a vector, you generally want to set things up such that the plane of symmetry is the x,y,or z plane, so you can just invert the x,y,or z component. (vector.z=-vector.z) Making any specific script requires a bit of knowledge about the intrinsic rotations of your door models. Edited September 21, 2021 by Quistess Alpha 1 Link to comment Share on other sites More sharing options...
Tattooshop Posted September 21, 2021 Author Share Posted September 21, 2021 2 hours ago, Quistess Alpha said: The inverse of a vector (v) is -v; the inverse of a rotation (r) is ZERO_ROTATION/r (or if you want to be clever, invert a rotation with r.s=-r.s) to mirror a vector, you generally want to set things up such that the plane of symmetry is the x,y,or z plane, so you can just invert the x,y,or z component. (vector.z=-vector.z) Making any specific script requires a bit of knowledge about the intrinsic rotations of your door models. Thank you very much! It works! 👍 3 hours ago, Rolig Loon said: Start here ... You can adapt that approach to your favorite method of opening a door. Thank you! 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