Door script that works linked and unlinked. It automatically closes after a time that is given in the script.
It remembers its closed-position to avoid "drifting" by accumulating inaccuracies in its position by SL's inaccurate rotation functions.
It can be freely rotated (linked and unlinked) to turn it into an auto closing trapdoor, auto closing drawbridge, auto-closing toilet seat all with the same script.
It comes with a gallery of example uses, linked, unlinked, and in various rotations.
It is small and efficient code. This makes it easy to add a remote control to make it a double door or open or close any door remotely, but it is not a double door script as it is.
By default it rotates +-90° and one parameter also easily adjust how much each door rotates.
No need to rotate all the textures on the door to turn a left side door into a right side door (that opens in the same outside/inside direction) just by rotating the door prim upside-down. Because alternatively a simple parameter changes if it opens outwards or inwards (left or right) bx the same angle, so you don't need to rotate the door prim upside down (which is a simple trick for such simple doors).
A simple workaround is that the door must reset in its "closed state". on state_entry it assumes a "closed state", opens for a second, and closes quickly (indicating how it will work) and then waits for a touch event to open for a while.
this way you can copy and move doors quickly. just make a copy of a door bay dragging a copy away to "state_entry" it there in its closed position.
For simplicity and efficiency this uses a prim cut in half. there is no offset rotation in this door.
and unlike billions of other door scripts, this one simply uses llSetLinkPrimitiveParamsFast(LINK_THIS,ROT_LOCAL , ...); and 2 functions, one to open and one to close a door.
- works linked and unlinked
- no drifting (caused by rotation inaccuracies accumulating)
- a parameter sets if it automatically closes after how many seconds
- a parameter sets if it rotates "outwards or inwards"
- a parameter sets how many degrees it opens/closes
Nice Script - works well
Thank you for this. It does what it should do.
Only Point i whish to have a Function for a "smooth" Move .. in Steps or by Time.
Then i give 6 Stars :)
Exactly what I needed!
Thank you very much! The script works great and reliable! Some coordinate shifts might occur after one or more open-close-cycles if the door is unlinked. In such cases just link the door and the problem is gone.