A guild of cunning thieves sneaks their way into an opulent mansion, filled with the riches that only generations of power can acquire. The mansion's private guard patrol within, seeking out intruders and relentlessly hunting down those that their efforts reveal. Every shadow is a potential hiding spot, every noise might be a clue to the presence of thieves. Every second lost can mean the difference between victory and defeat.
A guide to adding and configuring doors in a Nightblade map.
Posted by Immortius on May 8th, 2008
First, some background. Doors in Nightblade are made up of two parts - a Door Control kismet object and the actual physical door(s) themselves. The door control keeps track of the door state and shares it between a number of actual doors, making double doors easy to set up.
Setting up a Simple Door
1. All doors and other movers use static meshes in UT3. So the first step is to select a door static mesh in the generic browser. Nightblade's doors are in a package called NbDoor.
2. With the door mesh selected, right-click in one of the viewports hover over the Add Actor... menu option. You will see mixed into the UT3 options a number of Nightblade options. The relevant options for doors are the "Add NbDoor" and "Add NbDoor (Preconfigured)" choices.
"Add NbDoor (Preconfigured)" creates a door set up with a DoorControl, which is generally what you will want to use. "Add NbDoor" creates a door without a door control, which can be used to add additional doors to connect to an existing DoorControl - if you want to set up double doors, for instance.
For some reason, if you add a "NbDoor (Preconfigured)" without first having opened UnrealKismet at least once since opening UT3 Editor, the DoorControl doesn't get created (I guess this is an UT3 Editor bug), so open and close the Kismet editor and then add a "NbDoor (Preconfigured)". If this has worked (and kismet boxes aren't set to be hidden) then your door should appear with a friendly green kismet box around it.
3. Scale and position the door in the intended doorway, in the closed position. Please take note that the pivot point for Nightblade's doors is on one of the bottom corners (denoted by a red + in the viewports) - ensure that you place the door such that the pivot point is where you want the door to rotate around.
4. Right-click the door and select Find NbDoor_X in UnrealKismet. This should open UnrealKismet with the sequence relating to the door shown (it also opens a search window you can safely close). On the left of the sequence is the DoorControl. This contains the majority of the door settings:
bBreakable - can the door be damaged and eventually broken.
InitialDoorHealth - how much health the door has.
bInitialLocked - does the door start locked.
bPickable - can the door be picked.
fPickTime - how long it takes to pick the door's lock.
KeyTag - the tag of the key that can unlock this door.
OwningTeam - the team that owns this door, meaning they can open it even when locked.
damageSound - the sound the door makes when damaged.
lockedSound - the sound the door makes when locked.
unlockedSound - the sound the door makes when unlocked.
The properties for the NbDoor itself allow you to set the various opening and closing sounds for the door, under the InterpActor tab.
On the right is the Matinee sequence for the door. Double click this to open the matinee editor.
5. Zoom out on the matinee sequence using the mouse wheel until you can see both red triangles. This denote the length of the sequence. Doors should open and close reasonably quickly, so click the right-triangle and drag it back until the sequence is 0.75 seconds long (you may need to change your timeline granuality in the toolbar to 0.05s first).
Next set the current time to 0.000 by moving the black line to the left edge. Select the Movement Track under MoverGroup and press enter to set the initial keypoint. A little red triangle should appear.
Then move the current time to the right-edge of the time sequence. Without closing the Matinee window, select your door in the world and rotate it to the open position. Then return to the matinee window, select the Movement track again and press enter to add the final keypoint.
If you move the black bar back and forth in the matinee window you should see your door moving between the open and closed position in the world now.
6. One final step is required to get the door functioning - by default, NbDoors have no collision (this is another UT3 editor thing). Luckily you can add collision to all doors at once, so if you need to place a lot of doors you can do this step once at the very end. Select your door. If necessary, right-click the door and select "Select all NbDoor". Then enter actor properties, open the Collision tab and for Collision Type select COLLIDE_BlockAll.
At this stage your door should be fully functional in Nightblade. However, you will find that ingame the door won't be lit up except by ambient light and flares.
In UT3, the lighting system has been extended to include a number of lighting channels and various other options, giving precise if fiddly control over exactly what each light affects. The important channels are:
BSP - whether this light affects BSP geometry.
Static - whether this light affects static meshes (this is, the static meshes you place in the map, not the ones that are used for gameplay components like whistlers).
CompositeDynamic - this appears to be whether this light affects gameplay actors with light environments. Examples would be players and a lot of gameplay items like whistlers.
Dynamic - whether this light affects dynamic actors. The crucial example here are NbDoors and other movers.
Standard point lights and NbTorchLights are set to affect the BSP, Static and Composite Dynamic by default, so for a light to affect a door you will need to go in and switch on the Dynamic channel. You will probably also want to turn on CastDynamicShadows as well, which prevents the dynamic component of the light shining through walls and doors.
Be aware that having a lot of dynamic lights, especially overlapping, can drop performance. I recommend having only only one, maybe two lights on each side of a door set to affect the dynamic channel - the most significant one on either side.
Since your opulent mansion would be incomplete without a set of double doors, here's how to set a pair up.
1. First, set up a single door as described above.
2. Place your second door using the "Add NbDoor" option (not the preconfigured NbDoor).
3. Move, scale and rotate your door into closed position.
4. Open up the Kismet sequence for your first door, and then open the door's Matinee sequence.
5. Right-click under the original MoverGroup's movement track, and add a new empty group. Name it as you wish (you can also rename your original group). Right-click on the new group and add a movement track.
6. Close the Matinee window. You should see a new pink box on the bottom of the Matinee node in the Door sequence corresponding to the new matinee group. Select your second door in the viewport and then right-click in UnrealKismet. Choose "New Object var using NbDoor_x". This will add a node for the second door. Then click and drag a line from the new pink box to the second door's node. This links it to the second matinee track.
7. Open up the Matinee window and set up the key points for the second door, making sure to select the Movement track for your second MoverGroup before pressing enter.
8. Your double door is now complete. (Don't forget to set its collision).
Door handles add a little extra detail to your map.
1. Add the door handle mesh you wish to use to the map as an Interp Actor. Interp Actors are another option under the "Add Actors" menu, these are UT3's movers.
2. Rotate, scale and otherwise move it to where you want it to appear on the door.
3. Select the door you want to attack the handle to and make a note of its name (it will say on the status bar Persistent Level.NbDoor_X. The NbDoor_X bit is what you are interested in).
4. Select the door handle and open up the actor properties. Under the Attachment Tab, type in the door's name as the Base. Also select bHardAttach. Note that you don't need to type in the door's full name, just the last bit.
And that's it. All done. If you want to go further you can add extra matinee groups for the door handles and animate them a little when the door open and closes, although none of the door handles we currently have are set up for this.