These forums are CLOSED. Please visit the new forums HERE
Doors |
|
|
Spike Scarborough
Registered User
Join date: 12 May 2006
Posts: 2
|
08-08-2006 13:58
How do i Make 2 doors open the opposit way like if i want the 2 doors open the opposit way i mean like if the door is opening right i want to make the other door open left so whoever knows plz let me know asap
|
|
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
|
08-08-2006 15:12
in english?
_____________________
![]() tired of XStreetSL? try those! apez http://tinyurl.com/yfm9d5b metalife http://tinyurl.com/yzm3yvw metaverse exchange http://tinyurl.com/yzh7j4a slapt http://tinyurl.com/yfqah9u |
|
Agares Tretiak
Registered User
Join date: 2 Aug 2006
Posts: 2
|
08-08-2006 15:37
Well, I suppose a similar...and more coherent question of mine is "how do you script a door that will open away from, no matter which side of it your opening it from?"
|
|
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
|
08-08-2006 15:50
@Spike
I am assuming you already know how to make the doors rotate on a hinge. Link the two doors as one object so that you can use the messagelinked command. That way touching either door will send a message to the other door, so both will respond. @Agares Two ways I can think of. 1. Use a sensor (very short range) to locate the person who touched the door. That way you know which side of the door the person is on and the door can then figure out which way to open. 2. Make the door with two prims so that touching one side will make it open one way, touch the other side to make it go the other way. #1 is the more efficient way. _____________________
Aodhan's Forge shop at slurl.com/secondlife/Rieul/95/213/107
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
08-08-2006 18:09
1. Use a sensor (very short range) to locate the person who touched the door. That way you know which side of the door the person is on and the door can then figure out which way to open. 2. Make the door with two prims so that touching one side will make it open one way, touch the other side to make it go the other way. #1 is the more efficient way. I think it depends on your definition of efficiency. #1 is certainly way more prim efficient, and that's usually more critical. I'm pretty sure #2 is friendlier to the sim and the vm though. If I understand what Kelly and others are saying the only benefit from a shorter range sensor is fewer returns, the vm still looks for everything that meets the criteria to return them all. There is a third way. Since the various touch events trigger the various llDetected* you don't need the sensor. llDetectedPos() is available directly. That can be used to tell you which side of the door they're on (with some smart maths) and thus determine which way to swing. _____________________
|
|
Spike Scarborough
Registered User
Join date: 12 May 2006
Posts: 2
|
Doors
08-08-2006 19:23
Yeah but i don't know how to make doors or hinges plus i am not a good scripter but someone told me that u have to change the script to a positive to a negative. All i Want to know is how to change from a positive to a negative. So someone explain it to me all the way through and how to make it work. I am trying to slide them not hinge them.
Sincerely, Spike Scarborough |
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-08-2006 21:00
Try this. If you wanted them to rotate there'd have to be a little more data stored and a few more calls made.
1.) Make the doors and a frame (or threshold) prim, the latter of which will not move. Link them together. The frame/threshold should be the parent of the linkset. 2.) Put this script in each door prim (you'll have to have 'Edit linked parts' turned on and click on the door itself): CODE integer CHANNEL = 52; 3.) Turn on 'Edit linked parts', put both the doors where you want them when they are closed and say: /52 setclosed 4.) (With 'Edit linked parts' still on), put both the doors where you want them when they are open and say: /52 setopen 5.) Put this script in the parent prim (the frame/threshold): CODE integer currentState = 0; 6.) Leave Edit mode, touch the doors a couple of times, and enjoy! |
|
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
|
08-09-2006 00:09
IThere is a third way. Since the various touch events trigger the various llDetected* you don't need the sensor. llDetectedPos() is available directly. That can be used to tell you which side of the door they're on (with some smart maths) and thus determine which way to swing. Forgot about this one. Yes, the sensor is not needed. _____________________
Aodhan's Forge shop at slurl.com/secondlife/Rieul/95/213/107
|
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
Timeless Door
08-09-2006 02:57
Hi Spike
If you want a door that will survive a building rez and move, check out: http://secondlife.com/badgeo/wakka.php?wakka=LibraryTimelessLinkedDoor |