Jump to content

script door locks


oCHANTYo
 Share

You are about to reply to a thread that has been inactive for 1794 days.

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

Recommended Posts

Hi. i am just wondering if there is a way to stop the doors of my homes from going haywire when i add a lock script to them? FOr example, I have ought more than a few door lock scripts and I am not bashing any of the creators or sellers. I just wonder why when i open the doors they go all different directions when i used the scripts. AM i doing something wrong?

Thank you for your help

Link to comment
Share on other sites


oCHANTYo wrote:

AM i doing something wrong?

Yes.

I mean, it's not possible to guess what you're doing wrong since all you say is "when I used the scripts ...". It's possible that you're confused - Second Life scripts don't have universal operation, they won't ALWAYS "lock" your door, because that's not a thing.

Scripts run through actions that APPEAR to lock a door if the door is constructed in the same way the script expects them to be constructed. They'll rotate (this varies, sometimes they slide) 90 degrees (this number varies) on an axis (the axis varies) which appears to make a door look closed. With all that opportunity to vary, it's clear lock scripts are not universal.

It sounds like the doors you're using are not suited for the scripts you're trying to drop into them.

My advice is to hire a scripter or builder to help figure it out.

Link to comment
Share on other sites

True enough, but SL is all about illusions.  :)

And scripting a door to lock can be no harder than adding a test that says

if(llDetectedKey(0) == llGetOwner()) { //Open the door}

unless you want to go to the trouble of adding whitelist.

Link to comment
Share on other sites

One thing that comes to mind is that doors often have to be made of a cut in half prim so that the opening and closing can be done as a rotation around the middle of the prim which is the hinge edge. If you dont use a cut in half prim the script may well make the door go haywire. Any script of this sort should come with some kind of user guide that describes how to construct the door to work with the script, often text atthe beginning of the script. Locking door scripts are as old as the hills.

Link to comment
Share on other sites

  • 1 year later...

This thread is well over a year old, so the OP has likely moved on to other things by now. If you really want to learn about doors, start with a more general thread like

and then experiment.  There is no "best" way to script a door.  There are several general approaches, any one of which could be customized to meet the requirements of a specific situation.  You have to look at what you expect your particular door to do and go from there as you write your own script.

Link to comment
Share on other sites

Oh this wasn't for me necessarily (although I was doing a search for lock systems and stumbled upon this thread) - I just wanted to get people to share their solutions instead of perpetuating the "solved thanks bye" mentality.   I'm a programmer by hobby and trade (40+ years), so I value building a solid base of knowledge shared by a community to improve solutions to problems.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1794 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...