# Reinventing door script :D

Please take a moment to consider if this thread is worth bumping.

## Recommended Posts

Hello dear scripters! How to create the simplest swinging 'no hinge' door script? I can certainly not reinvent the wheel and take it ready, but I want to understand how it works.

##### Share on other sites

Start by reviewing the basics in the sticky thread on door scripting at the top of this forum.

Edited by Rolig Loon
• 1
##### Share on other sites

18 hours ago, Rolig Loon said:

Start by reviewing the basics in the sticky thread on door scripting at the top of this forum.

Thank you! very good topic! So I read it, but stuck on PRIM_ROT_LOCAL. I just can’t see what this vector is (< 1,0,0 > etc...) and how to express through it a rotation of 90 degrees along the z axis? It’s clear with PRIM_POS_LOCAL, it is expressed in meters...

##### Share on other sites

Do you think it will be enough to indicate a rotation of 90 degrees and an offset of half a meter along the axes X and Y for a one meter wide door using SLPPF? for the simplest door script?

##### Share on other sites

26 minutes ago, Tattooshop said:

I just can’t see what this vector is (< 1,0,0 > etc...) and how to express through it a rotation of 90 degrees along the z axis?

You're referencing something a bit out of context, so I can only guess what you mean. If you want to rotate an object 90 degrees around its local Z axis, you'll want to use

18 minutes ago, Tattooshop said:

Do you think it will be enough to indicate a rotation of 90 degrees and an offset of half a meter along the axes X and Y for a one meter wide door using SLPPF? for the simplest door script?

That sounds right.  After all,  the visible (hinge) edge of the door is halfway along its X dimension and halfway along the Y (thickness) of the door.  I'm not sure which approach you think creates the "simplest" door script.  As you can see from reading through that thread, there are many ways to script a door.  The simplest one is the one that fits your own needs best and is appropriate to the type of door you have created.

Edited by Rolig Loon
• 1