Turning objects into Doors

By Spike14

The first thing you must understand about making objects into doors, are the properties required for something to be a door: -The Door Property -The Scripts -The FrobInfo Okay. For this example we’re going to setup a bed that slides across the floor to reveal a hole in the floor with some gold. Now, create a room, with a Physical>Furniture>BedParts>FancyBed (be careful, if you try and use ANYTHING out of the >Bed> you will end up with a crashed DROMED). And under the bed create a pit with some gold. Now, click “Properties” with the bed selected. Now click Add>Door>Translating A pop-up box appears with the following fields: -Closed Position -Open Position -Base Speed -Axis -Status -Hard Limits? -Blocks Vision? -Blocks Sound % -Push Mass -Room ID #1 -Room ID #2 Uncheck both Hard Limits? and Blocks Vision?. Since the FancyBed object already blocks vision, checking Blocks Vision? will cause the bed to turn into a black block…and that would negate the entire purpose of this tutorial. Now, fill the Closed Position in as “0,” and the Open Position as “6.42.” 6.42 is the bed’s width, and setting the Open Position to this causes the bed to move 6.42 units in whatever direction when frobbed. Set “Axis” to “X-Axis,” and set “Status” to “Closed.” This is the axis that the bed will move along. The two planar axises are X- and Y-. And the vertical axis is the Z-axis. A translating Z-axis door moves up and down, whilst X- and Y-axis doors move left and right, and forward and back, respectively. Enter “100” in Blocks Vision? and “100” in Push Mass. Then hit “OK.” Now, scripts, hit Add>S>Scripts. And in the ensuing pop-up enter the following: Script0: StdDoor Script1: LockSounds Leave the rest blank. The first script allows the FrobInfo property to trigger the door mechanism that Door>Translating setup. The second allows for sound effects to be played if our bed is “locked.” Now hit Add>Engine Features>FrobInfo. Set the top box to “Script” but clicking the button and hitting “Script” to check it. This shall set the action to be taken when the bed is frobbed, or activated. In this case we want the “StdDoor” script to be activated, so we set the FrobInfo, World Action to “Script.” You can also setup “Inv Action” which specifies the action to be taken if the item is picked up and acted upon in your inventory, and the “Tool Action,” which specifies how tools act upon the bed. But this tutorial on doors doesn’t concern either of those. Now, to make a translating door, or a “spinny door” out of a banner! Create a Physical>Decorative>Banner>BaffBanner. And put it against a wall. Now, for creating a rotating door, the same properties are true! Only now we need a Door>Rotating property, instead of a Door>Translating property. So, add the Scripts and the FrobInfo, then hit Add>Door>Rotating. This pop-up is only a little different than the Door>Translating property dialog. The only difference is, where the translating box wanted sliding measurements, the rotating wants the degrees it should open! Set everything the same as last time, except the “Open Angle” and “Closed Angle” boxes, the “Axis” box, and the “Clockwise?” check box. Remember last time, I explained how axises worked? Well, that’s only for translating doors. This time we have rotating! So, the Z-axis means it opens the way most doors do, while the X- and Y-Axis setting create doors that rotate around their center and flop open and closed using the doors top or bottom edge as a axis. Since these doors are needed extremely rarely, I won’t get into details on them. Set the “Axis” box to “Z-Axis.” Now, set the “Closed Angle” to “0.” This will be your usual setting. Now, depending on how you want your door to open, you’ll set the “Open Angle” differently. Sincle this time we want the door opening away from the wall, set “Open Angle” to “270.” These angles describe the angle at which the door is at when its open, and when its closed. These angles aren’t the “real world” DROMED angles, in which “0” is facing south. No, these angles are in relation to the angle at which the banner/door/etc. is set. So, if the BaffBanner is set to H (Heading) 270, and you set the door’s “Closed Angle” to 0. When the door’s closed it will face 270 “real world.” Now, the “Clockwise?” checkbox. This specifies whether or not the door opens clockwise. Since making this door open counterclockwise would make it travel through the wall, we definitely don’t want it set to counterclockwise. So insure that the “Clockwise?” checkbox is checked. Just in case your wondering, the “Base Speed” setting on both doors is how fast the doors open and close. For my custom doors, I always use “2,” but you can pick any number you like! Now, hit Alt+G to explore your creation. Frob the bed and banner! The bed slides and closes! The banner flaps open and shut! Remember, if you want to create secret doors, wherein a switch opens and closes your custom doors, set the FrobInfo, “World Action” to Script, Ignore, by clicking on “Ignore” in the pop-up to check it. Then link a switch to the bed with a “ControlDevice” link. Go ahead, try it! Now when you flick the switch, your bed (or banner) opens up! Try hiding the switch in an airbrush behind the banner? There, a secret door for your FM!

About this entry