Swarm Placing Doors

From Valve Developer Community
Revision as of 15:06, 21 July 2010 by Ember (talk | contribs) (Added door types)
Jump to navigation Jump to search

Doors

Doors in AS:I are special entities using fixed meshes depending on the door type. We're using fixed meshes as the doors have animations of them being dented and smashed open by the Swarm.

The door entity to use is Asw door.

Set the door's world model to:

  • models/props/doors/heavy_doors/doorleft.mdl

A working door consists of two components: the Asw door itself and a door area. The door area is the space in which marines can stand to make the door open if it's an auto-opening door and it's the area in which a marine can seal/cut the door with the welding tool.

Swarm MappingDoor.jpg

Building a door

1) Place down an Asw door entity.

2) Bring up the properties of the Asw door you just placed and set the Name property to something unique to this door, like Door_1.

3) Using the block tool, make a brush for the door area, covering both sides of the door. This brush must have the texture tools/toolstrigger. Once the brush is placed, select Tools -> Tie to Entity (shortcut Ctrl + T) and select the class trigger_asw_door_area.

4) Bring up the properties of the trigger_asw_door_area brush you placed and set the UseTarget property to the name of your asw_door, e.g. Door_1.

That's the basics of a door. In-game your door will now open when a marine approaches, sliding to the side. It can also be cut and sealed with the welding tool.

Door Frame

The door frame must be constructed correctly so players can see whether the door is open or shut from the overhead view. This means building a frame for each side of the door, leaving a gap in the middle through which the player can see the top of the door itself. For example:

Swarm MappingDoorframe.jpg

Door Types

Auto Open

Door auto open.png

The standard type of door, which opens automatically when a player approaches it.

These doors contain an asw_door, a trigger_asw_door_area, a prop_dynamic set to panel02.mdl, and a trigger_asw_button_area.

1) Specify the asw_door in the UseTarget field of the trigger_asw_door_area

2) Specify the asw_door in the UseTarget field of the trigger_asw_button_area

3) Specify the prop_dynamic in the Panel Prop name field of the trigger_asw_button_area

Locked

These doors are locked. They require a tech to unlock them by hacking the panel.

To construct, these changes need to be made to the auto open door:

1) In the asw_door properties, change the Auto Open field to no.

2) In the trigger_asw_button_area, change Locked to yes.

3) Make an output from trigger_asw_button_area: OnButtonHackComplete>(asw_door name)>EnableAutoOpen

Sealed

These doors are welded shut. They require a player with the door welder to unweld them.

To construct, these changes need to be made to the auto open door:

1) Change the Total Seal Time in the asw_door properties to an appropriate number of seconds. The default is 10 seconds.

2) Change Current Seal Time in the asw_door properties to a positive number that is less than or equal to your Total Seal Time.

Slow Locked

Door locked slow.png

These doors are just like locked doors, except they are harder to hack and take a longer time to open.

To construct, these changes need to be made to the locked door:

1) In the trigger_asw_button_area, make it more difficult to hack by changing these properties:

  • Time to charge up: The door in example_map_1 has this set to 25
  • Num Wires: This is how many wires the tech has to complete. The door in example_map_1 has this set to 3. The max is 4.
  • Wire Columns: How many horizontal sections each wire has. The door in example_map_1 has this set to 6. The range is from 3 to 8
  • Wire Rows: How many vertical sections each wire has. The door in example_map_1 has this set to 3. The range is from 1 to 3.

2) Remove the asw_door and trigger_asw_door_area. Replace it with a prop_dynamic set to slow_heavy_door.mdl, and a func_brush textured with clip.

3) Remove the previous door name from the UseTarget field of the trigger_asw_button_area.

4) Change the previous output from the trigger_asw_button_area to OnButtonHackComplete>(prop_dynamic door name)>SetAnimation>open

5) Make a new output for the prop_dynamic door. OnAnimationDone>(func_brush name)>Disable

Door Properties

See the Asw door page for a list of door properties and their uses.

Door Area Flags

If you bring up the properties of your Trigger asw door area and go to the Flags tab, you can set which type of entity can trigger the Auto Open of the door. The two most relevant choices for AS:I are either "Marines and Aliens" or "Only Marines".

For consistency and background reasons, all but VERY high tech Auto Open doors should be left at the default ("Marines and Aliens").