Portal - Tutorial - Box Dropper

From Valve Developer Community
(Redirected from Vital Apparatus Vent)
Jump to: navigation, search
English (en)中文 (zh)Translate (Translate)


Portal Level Creation
Skill Level

This tutorial expects you to have this amount of knowledge within the topic to follow along smoothly.

Novice Familiar Competent Proficient Expert


This tutorial will show step-by-step how to create the box dropper, or vital apparatus vent, seen throughout the Portal test chambers. The box droppers can be used to give the player a new weighted storage cube whenever their previous one is destroyed.

Construction

Dropper model

The models

Create a prop_dynamic, set its model to models/props/box_dropper.mdl.

Create a prop_dynamic, set its model to models/props/box_dropper_cover.mdl and name box_dropper_model_cover.

Align the two entities so they are in the same place where the dropper should be in the map.

Ceiling Arch

Use the arch tool to create a 128L*128W*16H arch above the prop_dynamic entities with the following settings:

Property Name Value
Wall width 24
Number of Sides 8
Arc 360
Start Angle 0
Add Height 0

Tie this brush to a func_detail then use the vertex manipulation tool to move the corners of the arch so it resembles a rectangle with a hole in the middle. After that, texture the inner rim of the arch with metal/metalwall061f. Texture the underside of the arch with concrete/concrete_modular_ceiling001a.

Ceiling shaft

The shaft seen from the outside
The inside of the shaft with nodraw hidden

Create a shaft using brushes above the dropper with the dimensions of 128L*128W*256H and split the sides of the shaft in two equal pieces with the clipping tool. Then proceed to texture the lower inner walls with metal/metalwall_bts_006a, top inner walls with metal/metalwall_bts_006b_gradient and inner ceiling with lights/light_orange001.

Box Template

Create a small 128L*128W*112H room above the dropper shaft with nodraw textured brushes.

Next, create a prop_physics entity in the middle of this room and set its model to models/props/metal_box.mdl and name to box. Give it the following outputs:

  My Output Target Entity Target Input Parameter Delay Only Once
Io21.png OnOutOfWorld !activator Kill   0.00 No
Io12.png OnOutOfWorld logic_drop_box Trigger   0.00 Yes

Create a point_template in the middle of the box entity. Set its name to box_template and set its first template to box.

Create an env_entity_maker somewhere near the top of the shaft of the dropper. Set its name to entity_box_maker and set its Point_template to spawn to box_template.

Create a filter_activator_name entity somewhere in the map. Set its name to filter_boxes and set its Filter Name to box.

Create a logic_auto entity and enter the following output:

  My Output Target Entity Target Input Parameter Delay Only Once
Io12.png OnMapSpawn entity_box_maker ForceSpawn   0.00 No


Lid Brush

tube_stop_plugging

Create a 96L*96W*4H nodraw textured brush just below the lid of the dropper. Tie this brush to a func_brush entity. Set its name to stop_tube_plugging and set its Start Disabled keyvalue to Yes.

Lid Trigger

trigger_box_dropper_clear

Create a 128L*128W*128H trigger textured brush around the box dropper models.

Tie this brush to a trigger_multiple and enter the following properties:

Property Name Value
Name trigger_box_dropper_clear
Start Disabled Yes
Filter Name filter_boxes

Under Flags, modify the following:

Flag
Checkbox-on.png Physics Objects
Checkbox-off.png Clients

Now give it the following outputs:

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnEndTouch entity_box_maker ForceSpawn   0.00 No
Io11.png OnEndTouch box_dropper_model_cover SetAnimation close 0.00 No
Io11.png OnEndTouch stop_tube_plugging Enable   0.00 No
Io21.png OnEndTouch !self Disable   0.00 No
Io11.png OnEndTouch stop_tube_plugging Disable   2.00 No
Io21.png OnTrigger !activator Wake   0.00 No

Lid Logic

Create a logic_relay and set its name to logic_drop_box. Give it the following outputs:

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger box_dropper_model_cover SetAnimation open 0.00 No
Io11.png OnTrigger stop_tube_plugging Disable   0.00 No
Io11.png OnTrigger trigger_box_dropper_clear Enable   0.00 No


Shaft Slopes

The sloped brushes

Create brushes and use the clipping tool to shape them like depicted in the picture below. Tie all of these brushes to a func_detail entity. The dropper is now finished and ready to be implemented into a map.

Implementation

Place the dropper in the ceiling above where the box should drop. Texture the visible sides of the ceiling brushes with the signage/hazard_orange_03b texture.

Box Setup

Set up a trigger to send the Trigger input to the logic_drop_box entity. This can be done in numerous ways, such as using a trigger_once to have the box drop when the player enters the room or a trigger_look to make the box drop when the player is looking at the dropper.

Box Respawn

If there are fizzlers or Hazard Liquid in the map, the box must be set up to respawn if it can be lost. For fizzlers, add a OnDissolveBox output that triggers logic_drop_box to the trigger_portal_cleanser entity.

To make the box respawn if it's lost in goo, create a trigger_multiple within the goo volume with its filter set to filter_boxes, the Physics Objects flag set, and with the following outputs:

  My Output Target Entity Target Input Parameter Delay Only Once
Io21.png OnStartTouch !activator Kill   0.00 No
Io11.png OnStartTouch logic_drop_box Trigger   0.00 No