Create a Door Tutorial

From AAManual

Jump to: navigation, search

Created by Johan

This tutorial contains all the information you need to create a door in your map. First download the example map, and open it in your editor. There are a total of 6 rooms in this map, and they are connected with, of course, doors! Scroll down to find out how each door can be made, but it is advisable to first read the common steps to take.

Click here to download this example map

I. Common steps to take

Step 1: Subtracting the doorway

A door is used to let a player move from one room to another (pretty obvious). The space between those rooms (the ‘wall’) is usually 16 UU breadth. This is where you subtract your doorway. The height of the doorway is usually 128 UU. The width can be various (the exact dimensions for each door you see in the example map are posted below).

Subtracting the doorway goes the same as any other cube you subtract.

Step 2: Adding a frame to your doorway

Most doors in America’s Army should be surrounded by a doorframe. A doorframe is a static mesh you put inside your doorway. Align it so that it fits exactly in your doorway.

Step 3: Adding the door

This is the last step of adding a door to your map. In the Static Mesh Browser, select the door you want to add. Now press Add Mover (the blue icon with four arrows, seen in the left toolbar) to add the door as a mover in your map. Align it properly inside the frame you have added in step 2, and apply the right settings to your door (double-click on the door to change the properties of it). These settings can be found in the section below.

II. Examples

I have posted a short tutorial on how to create each door below. It also contains the dimensions of the doorway and the static meshes used. Please check the example map to see the properties applied to each door. Most of these properties are crucial to make the door functional, some of them can also be customized (like the door sounds).

Door 1: Default door

This is the simplest door, and also the most common door you’ll find in America’s Army. It can be opened in both directions. When you add the door as a mover, you’ll have to configure the keys. Keys are very important for movers, as they tell the mover which way the object can move. For the door, you’ll have to set 2 keys (key 1 and 2).

Key 0 is when the door is shut. Key 1 is when the door is opened one direction, and key 2 is when the door is opened the opposite direction of key 1. You can configure those keys by opening the Properties dialog of the door, expanding the Mover group, and then selecting the KeyNum property. By default it is put on 0. Change it to 1. Then move the door 90 degrees, put it to 2, and move the door 180 degrees (facing the other way). Now put it back to 0 to put the door to its original position.

You’ll also have to set bTwoWayer to true (under the MoverTwoWay group). Now you’ll see an A and B appear next to the door. They are facing the opposite way. Change TwoWayKeyB to the key (either 1 or 2) that is facing B’s direction. This setting is set to 2 by default.

The last thing you might want to change is the InitialState of the object. By default, this is set to BumpOpenTime. This will open the door when you 'touch' it, and the game will automatically close it. If you want the door to be opened using the Action Key (by default, F), then change this setting to UseControl.

Doorway dimensions

Height: 128
Width: 64
Breadth: 16

Static meshes

Frame: M_AA2_Doors.General.ind03_blue1a_frame
Door: M_AA2_Doors.General.ind02_blue

Click for Door 1 Properties

Door 2: Two doors in one frame

This door is basically the same as door 1, it just has two doors in it’s frame instead of one door.

Doorway dimensions

Height: 128
Width: 120
Breadth: 16

Static meshes

Frame: M_AA2_Doors.industrial.doors2_Industrial_doorframe_b
Door: M_AA2_Doors.industrial.doors_Industrial_door_a

Click for Door 2 Properties

Door 3: Using triggers with doors

Triggers can be very useful when you want the door to automatically open when you enter a specific area. This example door contains some more static meshes (glass) than the other doors. They can be found in the door_sliding group of the M_AA2_Architectural file. Once you have added the static meshes and the two movers, you will have to add a trigger. This trigger will active the door, so that it opens.

A trigger can be added by opening the Actor Class Browser. Then open the Triggers group, and select the Trigger actor. Add it to the center of the two movers, and open it’s Property dialog. Open the Collision node, and change the CollisionRadius to a value that fits for you door. It’s the area where the trigger is activated once a player enters it. I have used 170 for this example. You can actually see this collision cylinder by opening a Viewport menu, and click on Actors -> Radii View.

The next thing you’ll have to set is the Event name. Open the Events node, and think of a good name for your event. Once you have applied this name, you’ll have to set this event name as tag name to your movers. Select both movers (by holding down CTRL), open the Property dialog, then open the Events node, and change the Tag to the name you have just applied to your trigger. Now open the Object node, and change InitialState to TriggerControl, otherwise it will not listen to the trigger. Rebuild All and your door should work!

Doorway dimensions

Height: 192
Width: 384
Breadth: 16

Static meshes

Frame: M_AA2_Architectural.door_sliding.arch2_ds_frame
Door: M_AA2_Architectural.door_sliding.arch2_ds_Door_Right_Intact

Click for Door 3 Properties


Note: These doors use glass. This tutorial / example does not handle breaking glass. It will be handled in another example I’m going to make.

Door 4: Breachable door

Breachable doors are a cool feature of America’s Army. You can use them in your map to make it harder for one (or both) teams to get inside a specific building. To make a breachable door, you’ll have to do the same things as with door 1. After you have applied these settings, you will have to set the door to be breachable. Right click on the example door I have made to see what settings are applied. You definitely have to change the values of the DamageType and DecoMesh group. There’s one interesting option in the Mover group. You can change the LockingStyle to LockedForAll, TeamZero or TeamOne. This setting tells the game which teams will have to breach the door.



Doorway dimensions

Height: 128 Width: 64 Breadth: 16

Static meshes

Frame: M M_AA2_Doors.industrial.doors_Industrial_doorframe_a Door: M_AA2_Doors.industrial.doors_Industrial_door_c DamagedDoor: M_AA2_Doors.industrial.doors_Industrial_door_blown_b

Click for Door 4 Properties


Views

Personal tools