Double Doors or Changing a Door's Rotation
From FleshWorks
by David
Creating Double Doors
- Place two doors next to each other and rotate one 180 degrees so that their handles meet in the middle.
- Select one of the doors and go to the Actor Links either by right-clicking or Show Actor Links> from the View menu.
- Select the link that has the door as the source and the destination and has a flavor of HingedAttatchment and click Edit Selected Link.
- Expand the bottom properties rung, and expand the item Physics. Beneath that expand m_hingeAxis and change the Z item to -1. If you find that the door pivots incorrectly (intersects the door frame) expand m_hingeLocation and change Y to -6 (This value might vary depending on the thickness of the door)
- Click Done twice and that should be it, both doors should now open in the same direction.
Adding Locks and Linking Them
This following section will show you how to add locks to a set of double doors, and also use a set of scripts so that one door automatically unlocks the other when picked, or frobbed when the player has the correct key.
- Complete the steps in this tutorial for locking doors. Make sure to add locks to both doors.
- Select each door in turn and choose its properties from the right-click menu, or press F4. Note down their names, you'll see something like D_322MyLevel.D_322""__1(ManDoor__1)"" you are interested in this section: ""ManDoor__""1. There are two underscores in a row there.
- Select one door and expand the bottom properties ladder, right-click and choose Add Property. Select Scripts from the left column and TriggerScripts from the right.
- Select the new TriggerScripts from the properties window and click Empty. This will erase all the currrent scripts on the door.
- Add a new trigger script, click the Add button next to the TriggerScript object. A new rung will appear below it with a number in square brackets. Click the button with three dots on it (...). This will open up the Trigger Scripts Manager
- Select the trigger script DoubleDoorUnlock, this resides under the GameObjects Category. Click OK and you will be returned to the Properties window. From here click the Use button to confirm you do want to use the script.
- Repeat steps 5 and 6, but this time select the trigger script DoubleDoorLock
- Repeat steps 3-7, this time for the other door.
- Select each door in turn and choose its Actor Links, or choose Show Actor Links from the View menu. Click Add Link and select TriggScript from the Link Types list.
- In the FROM box make sure the door's name (similar to ""ManDoor__""1) is in it. In the TO box enter the name of the other door. Click OK and then Done and repeat for the other door.
Back to Doors, Locks and Keys Tutorials Page
Back to Mission Design: World Objects Tutorials Page
