Border Tutorial
From AAManual
|
Introduction
This is the second tutorial. You should have already completed the first tutorial on the Dusk Map. This tutorial will build on the concepts you learned in the Dusk Tutorial and focus on some additional game objects you can use in the America’s Army level creation process. Again, the version of the Unreal Editor you have received will work only with approved America’s Army assets and will allow you to create new maps and missions using the rich content that has been created by the America’s Army team.
We will start with the planning and creation of your game level using the map Border.aao as a reference.
Level Planning
The level planning is a bit different for Border. As you can see from this image Border is a much more open outdoor map with wider areas, less buildings and a much different feel.
We will look at some of the features in the Border map and add them to your base tutorial map.
Advanced Terrain creation
The Border map depends much more on terrain. It has higher hills, rocky areas for steep terrain sides and a more complex terrain layer setup.
While you still have the Border map open in the editor, select the Terrain Editing mode. In the Terrain Editing window select Layers.
There are 6 terrain layers here, created just the way you created your terrain layers in the earlier tutorial. The base layer is sand for the map area. There is a dirt layer to change the look of some areas, a weeds layer to add a vegetation look in some areas, a dirt road layer to create a road system through the village area, a grass layer for grass covered areas and a stone layer to apply to the steeper faces of terrain to give them a rock feel. There are also 2 layers of decoration that will be covered in the next section.
Open up the map you made in the first tutorial and let’s add another layer to our map that is a rock face for steeper terrain.
Open the Texture browser and find TER_ROCK_CRUD_002 in the T_AA2_Terrain.utx file and select it. In your AGP_ZoneInfo node set the AmbientBrightness under ZoneLight to something brighter, say 128. Now select the Terrain Editing mode. In the Terrain Editing window select Layers, select the first available undefined layer and then select New.
Fill out the new layer info as follows:
Now we have a new layer of terrain we can use to paint.
The scale of the terrain texture mapping to the terrain layers may be adjusted in the TerrainInfo properties. In the Terrain Editing window, select the Terrains tab and double-click on your TerrainInfo.
This will bring up our TerrainInfo properties.
Expand the TerrainInfo section and make the following settings: expand the TerrainScale property and set X to 128, Y to 128, and Z to 512.
Now expand and look at the Layers section.
Expand Layer[0] and set the UScale and VScale properties to 2.0. This changes how the texture is mapped to the terrain. You can adjust these values up or down to affect the appearance and get the best scaling. Close the TerrainInfo properties.
In the Terrain Editing window select Terrains and select the heightmap so we can paint on the terrain.
Be sure to set the Inner and Outer radius and the Strength to values as shown above. You can adjust these to personal preference as needed. Select Painting and using CTRL-Left mouse to raise and CTRL-Right mouse to lower, build a raised piece of terrain with some steep walls on one side that we can layer with our rock face terrain layer. Remember that you can use the Smoothing and Flatten functions in addition to the Painting function to achieve the desired result.
You should have something that looks like this to start painting. Save your work.
Now you will paint the steeper faces of the terrain with our new RockFaceDark layer. Select the Layers tab and then select the RockFaceDark layer that you created earlier. Select Painting from tools and make sure the settings are as shown below.
Position your brush so the outer radius gives a blend from the flat surface to the steep surface.
CTRL-Left mouse will paint the layer on the terrain, if you make a mistake use CTRL-Right mouse to erase the layer. Paint the sides of the hill with the RockFaceDark layer.
This is how you change areas of terrain to vary their appearance. The possibilities are numerous and will allow you to create any type of terrain you like.
Decoration Layers (deco layers) are another type of terrain layer. These are areas you paint on to the terrain that draw in static meshes such as plants and trees. These layers move with your player view, drawing only what you need to see to create a richer view. Borders’ terrain has two deco layers in it.
We will add one deco layer to your tutorial map. Select the Decorations tab in the Terrain Editing window.
In the Static Mesh Browser find the M_AA2_Foliage package. Look in the bush group and select fol_brush_desertplant_bunched.
Now in the decorations section of the Terrain Editing window, click on New and you will see the following:
Right-click on the new Deco Layer and choose Set Static Mesh from current, which will insert the fol_brush_desertplant_bunched mesh you just selected.
Now select the Layers tab. In the Texture Browser open T_AA2_Terrain. Go to the misc group and select TER_MISC_TUNDRA. This bright texture will stand out.
In the Terrain Editing window, in the Layers section select the next undefined layer and then click New.
Fill out the new layer info as shown below:
This will create a bright green layer to paint with, which makes it easier to determine where the deco layer is being applied. We will later hide the bright green area.
Now open the myLevel package from the drop-down list in the Texture Browser and select the DecoLayer texture.
In the Terrain Editing window select the Decorations Tab. On your deco layer right-click DENS. and select Set Density Texture from Current.
Now select the Terrains tab and double-click on the TerrainInfo to bring up its properties.
Expand the TerrainInfo section and the DecoLayers section. Open DecoLayer [0] and set the FadeoutRadius Max to 5000 and Min to 4000. Set MaxPerQuad to 5 and set ShowOnTerrain to 1. Go back to the Terrain Editing window and select Layers. Select the DecoLayer you created and paint an area of your terrain. It will look bright green but notice that the decorations (bushes) are painted as well.
When you are done, it should look something like this:
Now, using down arrow button, we will move the DecoLayer in the Layers tab down one level so that it does not draw the bright green texture.
Exit terrain editing mode, build and save your level, run it, and look at the plants that are drawn.
Triggers, Movers and Emitters
Triggers, Movers and Emitters are three more types of objects you can use to enhance your level. Triggers are connected to different objects, like sounds or emitters, to cause an event that makes a sound play, etc. Movers are objects that move a mesh, making a door open and shut, for example. Emitters are particle emitters like smoke, fire or sparks.
Triggers are used to make things happen when the trigger is set off. In this tutorial, we will use a trigger to play a sound. In the Actor Class Browser select a Trigger.
Right click in your level in a spot near your building and select Add Trigger Here. Double-click the new trigger icon and fill out its properties as follows.
The Event property under Events is the name of the event it will fire off when triggered. Set the RepeatTriggerTime if you want a delay from when it will fire off again if it is continually triggered. You can also set bTriggerOnceOnly to True if you want the event to only happen once. The ReTriggerDelay property is how long it takes for it to retrigger.
Now select an Event Sound object in the Actor Class Browser as shown below.
Place it in your level as before by right clicking and selecting Add EventSound Here. Open the new EventSound properties window (double-click the icon you just placed). In the Sounds Browser find and select S_AA2_Foley.machines.jetpassby.
In the properties of the EventSound fill out the following:
Set MySound under EventSound to S_AA2_Foley.machines.jetpassby and the Tag property under Events to PlayMySound as shown above. Notice that the Event property you set on the trigger earlier as “PlayMySound” matches the tag of the EventSound. This how the two objects are coupled together, which will make the EventSound object react when your trigger sends the PlayMySound event. In this case, the EventSound object will play the jetpassby sound when the trigger is activated, which by default will happen by player proximity to the trigger. In the Trigger properties under Advanced you can set bHidden to false for testing. This allows you to see your trigger icon when you play the level. Make sure you set it back to true for the final version of your map.
Emitters can be triggered or they can be on when your level starts. Lets place a smoke emitter.
In the Actor Class Browser select:
Right-click in your level and place it. Select your Perspective View and hit ‘P’ for a real-time preview. You can see what your smoke emitter will look like.
To trigger an emitter, make another trigger. You can use CTRL-W or right-click and select Duplicate to copy the trigger you made earlier. Move the new trigger to the desired location and set its event (double-click trigger icon, select Events > Event) to be TriggeredSmoke as shown below.
In the Actor Class Browser find:
Place the fx_exp_smokespawner in your map as you have done other objects and set its Events Tag property to TriggeredSmoke as shown below. Again, notice that the tag of the fx_exp_smokespawner matches the event property of the trigger.
Build your level and test it. The trigger will cause the emitter to start. If you copied the trigger from the earlier lesson, the trigger’s bHidden property will still be set to True. This is helpful for tweaking the trigger properties but will need to be set to False for final construction.
To demonstrate movers we will use a simple door object. In the Static Mesh browser select M_AA2_Doors.wood.door_wood.desert03.
Move the Builder Brush to a location in your level near where you would like your door. Then click on the Add Mover Brush button.
This will create a purple mover brush that uses the door_wood.desert03static mesh. Position it on the ground in your level. Open the Mover properties as shown below (double-click the door in the mover builder brush and expand the Mover section).
Set bMoveFastWhenRun to True, bMoveSlowWhenLow to True, BumpType to BT_AnyBump, LockingSide to SIDE_Both, LockingStyle to LS_Any, MoverEncroachType to ME_StopWhenEncroach and MoveTime to 1.5.
The LockingStyle means the door is locked from both sides and you must trigger it with the Action Key ‘F’. LockingStyle tells you which teams may open it. In this case, we want both teams to be able to open this door.
MoverEncroachType tells it to stop moving if a player is blocking the door when it starts to move and MoveTime is how long it will take the door to open. This can be adjusted depending on the door type and situation.
In the Mover Properties under the MoverSounds section you can set up the noises the door makes when it opens. At this point, you should be able to find, select, and “use” the sounds displayed below in the sounds browser. Using the techniques learned earlier, implement the sound settings as shown below:
We want the door to open both ways, so set the MoverTwoWay properties as shown below.
In the MoverTwoWay section set bOneWayMover to False and bTwoWayMover to True.
Now we must set up the movement positions of the door. This is done by entering keyframe numbers for the mover and positioning the door where we want the keyframe positions (opening points) to be. In the mover section of the door’s Mover Properties find the KeyNum property.
It is currently set to 0, and our door is in the closed position. Now set KeyNum to 1. If you look at the two-dimensional views of the editor, you will see that the door is still in the closed position but there are two arrows coming from the door: A and B. Notice that the “A” position now has a box surrounding it. This is where we set the position we want the door to rotate to for keyframe 1 (position A). With 1 in the KeyNum property, it looks like this.
Rotate the door in the top view using CTRL-Right mouse and dragging the mouse to the right until the door rotates 90 degrees, notice that initially the door and the A and B locations all move but when you let go of the right mouse button it will look like this:
Enter 2 in the KeyNum property and rotate the door to B so it looks like the picture below. This sets the “B” position of the door, corresponding to Keyframe 2. In this case, 2 in KeyNum is going to represent a fully open door in the opposite direction from A.
Now enter 0 back in the KeyNum property, which is already set as the closed position. Remember to always enter the frame number you wish the mover to start in when the level runs. For this case, 0 is our shut position , which means we want the door to be closed when the level starts. The settings we have made to this point will cause the door to open when a player bumps into it and the door will automatically close after 4 seconds. To program the door to only open and close when the player presses the use (Default “f”) key, expand the Object section of the Mover Properties of the door and set the InitialState to UseControl as shown below:
Now we have a door that will open on command, save your work, build and run your level. Notice that the door opens when you press the use (Default “f”) key.
Glossary of Units
Unreal Unit( UU ) = a unit of measurement in Unreal Ed.
In America’s Army game the following scales are used:
DISTANCE
- 256 UU = 487.68 cm = 16 feet.
- 1 meter = 52.5 UU
- 1 foot = 16 UU
- 1 cm = 0.525 UU
- 1 UU = 0.75 inches
COMMON MEASUREMENTS
- Doorway: 128 units high, 64 units wide, 16 units deep
- Stair: 16 units high, 24units deep
- Duct: 80 units high, 80 units wide
- Cover, prone: 24 units high
Unreal Rotation Units
| Value | Degrees | Steps Per Cycle |
|---|---|---|
| 1024 | 5.625 | 64 |
| 2730 (2730.666...) | 12 | 24 |
| 8192 | 45 | 8 |
| 16384 | 90 | 4 |
| 24576 | 135 | |
| 32768 | 180 | 2 |
| 65536 | 360 | 1 (Full Circle) |
- const URotToRadian = 0.000095873799
- const URotToDegree = 0.005493164062
- const RadianToURot = 10430.3783505
- const RadianToDegree = 57.2957795131
- const DegreeToURot = 182.0444444444
- const DegreeToRadian = 0.017453292519











































