Simple Door

I was asked to do some updates to a free door script, and this was the result.

It is designed for a path-cut door, to get it rotating about the correct verticle axis.  I changed the movement to be a local movement so the door can be linked with movement relative to what it is linked to.  I also added linked messages so that two doors can open together if you wish.

The values at the top of the script defines the door behaviour – whether it automatically shuts, has a sound, automatically opens on collision, is linked to other doors and whether the direction should be reversed.

To get a pair of doors, you need one with direction = 1 and one with direction = -1 and both should be linked.

If you want several sets of doors in the same linked object, then if you don’t want them all opening together, you’ll need to change the magic number “LINK_MSG_NUM” for one set of the doors.

As I say in the script, I don’t know where the original script came from so can’t credit it further.

If you are not comfortable pasting scripts from the web into SL you can buy a pre-packaged version of this script on the marketplace, or in-world at my store.

K.

Advertisements

~ by kimmpaulino on May 25, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: