Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
|
09-17-2004 19:15
I'm working on some scripts for an apartment building/townhouse. To increase resident privacy, the doors and windows should only open for the residents of that particular unit.
To accomplish this, the parent prim of the building keeps a couple of notecards with important names on it, and any other script in the building can check against that list of names with linked messages.
The problem is on the doors. It is not practical to have the hinge of the door be the parent prim of the building. For one thing, I need to be able to get to the cards easily. For another, if I want to have two doors in the same house, both of the hinges can't be the parent prim of the building.
I thought i had a workaround. I used a prim that was half transparent, and was going to make it phantom when open so the invisible half didn't knock people around. But then when I opened the door, I fell through the floor, so no dice there.
Is it possible to have a door swing like a door and still have it be connected to the house?
|
Goshua Lament
Registered User
Join date: 25 Dec 2003
Posts: 703
|
09-17-2004 19:43
_____________________
Flickr Second Life Photo GalleryI no longer regularly login to SecondLife, but please contact me if an issue arises that needs my attention.
|
Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
|
09-17-2004 19:49
unless I misunderstand what they are saying, that is not adequate, I'm afraid. It relies on the door being attached to the parent prim, and also that that parent prim rotate on the appropriate axis.
This is bad for me because a) the parent prim would be a hinge, and I need to store things there, and b) because if I want to have two doors on the house, they both can't have the same parent prim.
Am I wrong about that?
|
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
|
09-17-2004 20:32
eseentially, yes.
You can get a child to rotate in relation to the parent prim or in relation to global positions, regardless of where it is attached in your setup. Doing a door should be particularly easy for you as long as your door is a single prim. If it's not, you'll have to either rotate each prim in the same arc, or set pos them to follow the arc of the main portion of the door. Confused yet? Good. In simpler terms, it matters not where your parent prim is or really what orientation it is in, just not that you can have all your child prims gleefully spinning and whirling around it any which way you like depending on how deep you want to go into it.
|
Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
|
09-17-2004 20:52
Thank you, Siro. Gonna chew on that see if I can make it happen as you say. 
|
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
|
09-18-2004 11:06
The simplest way is to use a cut block as a single prim door, one that doesn't have a separate prim as a hinge. If you set the begin cut and end cut parameters on a block appropriately, you will get a prim whose "center" is located at its edge. Rotating it around its "center" -- using the code described in the wiki entry linked above -- will make the prim swing open and closed like a door.
|
Mike Zidane
Registered User
Join date: 10 Apr 2004
Posts: 255
|
09-18-2004 11:11
Brilliant. I think I'm gonna make al altar to you in my new house 
|
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
|
09-18-2004 22:04
Or just have the door llSay a request on a private channel number, and get a response in the same way. Then it does not need to be linked. Remember that avatars sitting on changing objects has problems.
_____________________
~ Tiger Crossing ~ (Nonsanity)
|