Box dropper: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Changed some of the layout elements on the page)
Line 1: Line 1:
{{back | Portal Level Creation}}
{{Back | Portal Level Creation}}
{{DISPLAYTITLE: Portal - Tutorial - Box Dropper}}
{{toc-right}}
{{Tutorial Skill Level | skill=2}}


This tutorial will show step-by-step how to create the '''box dropper''', or '''vital aparatus 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.
This tutorial will show step-by-step how to create the '''box dropper''', or '''vital aparatus 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.
__NOTOC__
 
{{clr}}


== Construction ==
== Construction ==
=== Step 1 ===
=== Dropper model ===
Create a <code>[[prop_dynamic]]</code> entity using the [[entity tool]]. Set the first one's model to <code>models/props/box_dropper.mdl</code> disable the shadows. Create a <code>[[prop_dynamic]]</code> and set it's model to <code>models/props/box_dropper_cover.mdl</code> and set its name to <code>box_dropper_model_cover</code>. Align the two entities so they are in the same place where the dropper should be in the map.
[[Image:Box dropper models.jpg|right|thumb|300px|The models]]
<gallery>
 
Image:Box dropper models.jpg|The models
Create a <code>[[prop_dynamic]]</code>, set its model to <code>models/props/box_dropper.mdl</code> and disable the shadows.  
</gallery>
 
Create a <code>prop_dynamic</code>, set its model to <code>models/props/box_dropper_cover.mdl</code> and name <code>box_dropper_model_cover</code>.  
 
Align the two entities so they are in the same place where the dropper should be in the map.


=== Step 2 ===
{{clr}}
Use the [[Hammer Arch Properties|arch tool]] to create a <code>128l*128w*16h</code> arch above the <code>prop_dynamic</code> entities with the following settings:
 
:'''Wall width''': 24
=== Ceiling Arch ===
:'''Number of Sides''': 8
[[Image:Box dropper arch3.jpg|right|thumb|300px|The arch, vertex manipulated and textured]]
:'''Arc''': 360
 
:'''Start Angle''': 0
Use the [[Hammer Arch Properties|arch tool]] to create a <code>128L*128W*16H</code> arch above the <code>prop_dynamic</code> entities with the following settings:
:'''Add Height''': 0
{| class=standard-table
!  Property Name || Value
|-
| Wall width || 24
|-
| Number of Sides || 8
|-
| Arc || 360
|-
| Start Angle || 0
|-
| Add Height || 0
|}


Next use the [[Hammer Vertex Tool|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 <code>metal/metalwall61f</code>. Texture the underside of the arch with <code>concrete/concrete_modular_ceiling001a</code>.
Next use the [[Hammer Vertex Tool|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 <code>metal/metalwall61f</code>. Texture the underside of the arch with <code>concrete/concrete_modular_ceiling001a</code>.


<gallery>
{{clr}}
Image:Box dropper arch.jpg|The arch
Image:Box dropper arch2.jpg|The arch after vertex manipulation
Image:Box dropper arch3.jpg|The arch textured
</gallery>


=== Ceiling shaft ===
[[Image:Box_dropper_shaft.jpg|right|thumb|300px|The shaft seen from the outside]]
[[Image:Box_dropper_shaft2.jpg|right|thumb|300px|The inside of the shaft with nodraw hidden]]


=== Step 3 ===
Create a shaft using brushes above the dropper with the dimensions of <code>128L*128W*256H</code> and split the sides of the shaft in two equal pieces. Then proceed to texture the lower inner walls with <code>metal/metalwall_bts_006a</code>, top inner walls with <code>metal/metalwall_bts_006b_gradient</code> and inner ceiling with <code>lights/light_orange001</code>.
Create a shaft using brushes above the dropper. The inner dimensions of the shaft should be <code>128w*128l</code>. The height of the shaft should be around 256 units. Split the sides of the shaft in two 128 units from the top. Texture the lower sides of the shaft walls with <code>metal/metalwall_bts_006a</code> and texture the top sides of the walls with <code>metal/metalwall_bts_006b_gradient</code>. Finally, texture the ceiling of the shaft with <code>lights/light_orange001</code>.


<gallery>
{{clr}}
Image:Box_dropper_shaft.jpg|The shaft seen from the outside
Image:Box_dropper_shaft2.jpg|The inside of the shaft with nodraw hidden
</gallery>


=== Step 4 ===
=== Box Template ===
Create a small <code>128w*128l*112h</code> room above the dropper shaft with [[nodraw]] textured brushes. Next, create a <code>[[prop_physics]]</code> entity in the middle of this room. Set the <code>prop_physics</code> entity's model to <code>models/props/metal_box.mdl</code> and set its name to <code>box</code>. Give it the following outputs:
Create a small <code>128L*128W*112H</code> room above the dropper shaft with [[nodraw]] textured brushes.  
 
Next, create a <code>[[prop_physics]]</code> entity in the middle of this room and set its model to <code>models/props/metal_box.mdl</code> and name to <code>box</code>. Give it the following outputs:
{| {{OutputsTable}}
{| {{OutputsTable}}
| [[Image:Io21.png]] || OnOutOfWorld || !activator || Kill || &nbsp; || 0.00 || No
| [[Image:Io21.png]] || OnOutOfWorld || !activator || Kill || &nbsp; || 0.00 || No
Line 44: Line 60:
|}
|}


Create a <code>[[point_template]]</code> in the middle of the <code>box</code> entity. Set its name to <code>box_template</code> and set its first template to <code>box</code>.
Create an <code>[[env_entity_maker]]</code> somewhere near the top of the shaft of the dropper. Set its name to <code>entity_box_maker</code> and set its ''Point_template to spawn'' to <code>box_template</code>.
Create a <code>[[filter_activator_name]]</code> entity somewhere in the map. Set its name to <code>filter_boxes</code> and set its ''Filter Name'' to <code>box</code>.


Next create a <code>[[point_template]]</code> in the middle of the <code>box</code> entity. Set its name to <code>box_template</code> and set its first template to <code>box</code>. Now create an <code>[[env_entity_maker]]</code> somewhere near the top of the shaft of the dropper. Set its name to <code>entity_box_maker</code> and set its ''Point_template to spawn'' to <code>box_template</code>.
=== Lid Brush ===
[[Image:Box_dropper_stop_plugging.jpg|right|thumb|300px|<code>tube_stop_plugging</code>]]


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


Create a <code>[[filter_activator_name]]</code> entity somewhere in the map. Set its name to <code>filter_boxes</code> and set its ''Filter Name'' to <code>box</code>.
{{clr}}


=== Step 5 ===
=== Lid Trigger ===
Create a <code>96w*96l*4h</code> nodraw textured brush just below the lid of the dropper. Tie this brush to a <code>[[func_brush]]</code> entity. Set its name to <code>stop_tube_plugging</code> and set its ''Start Disabled'' keyvalue to ''Yes''.
[[Image:Box_dropper_trigger.jpg|right|thumb|300px|<code>trigger_box_dropper_clear</code>]]


Create a <code>128L*128W*128H</code> [[Tool_textures#trigger|trigger]] textured brush around the box dropper models. Tie this brush to a <code>[[trigger_multiple]]</code> and set its name to <code>trigger_box_dropper_clear</code>, set its ''Start Disabled'' keyvalue to ''Yes'' and set its ''Filter Name'' to "<code>filter_boxes</code>". Go to its flags and make sure the ''Physics Objects'' flag is checked and the ''Client'' flag is unchecked. Now give it the following outputs:


Next create a <code>128w*128l*128h</code> [[Tool_textures#trigger|trigger]] textured brush around the box dropper models. Tie this brush to a <code>[[trigger_multiple]]</code> and set its name to <code>trigger_box_dropper_clear</code>, set its ''Start Disabled'' keyvalue to ''Yes'' and set its ''Filter Name'' to "<code>filter_boxes</code>". Go to its flags and make sure the ''Physics Objects'' flag is checked and the ''Client'' flag is unchecked. Now give it the following outputs:
{| {{OutputsTable}}
{| {{OutputsTable}}
| [[Image:Io11.png]] || OnEndTouch || entity_box_maker || ForceSpawn || &nbsp; || 0.00 || No
| [[Image:Io11.png]] || OnEndTouch || entity_box_maker || ForceSpawn || &nbsp; || 0.00 || No
Line 69: Line 92:
|}
|}


<gallery>
{{clr}}
Image:Box_dropper_stop_plugging.jpg|The <code>tube_stop_plugging</code> brush
Image:Box_dropper_trigger.jpg|The <code>trigger_box_dropper_clear</code> brush
</gallery>


=== Lid Logic ===
Create a <code>[[logic_relay]]</code> and set its name to <code>logic_drop_box</code>. Give it the following outputs:


=== Step 6 ===
Create a <code>[[logic_relay]]</code> and set its name to <code>logic_drop_box</code>. Give it the following outputs:
{| {{OutputsTable}}
{| {{OutputsTable}}
| [[Image:Io11.png]] || OnTrigger || box_dropper_model_cover || SetAnimation || open || 0.00 || No
| [[Image:Io11.png]] || OnTrigger || box_dropper_model_cover || SetAnimation || open || 0.00 || No
Line 85: Line 105:
|}
|}


=== Step 7 ===
Create brushes and use the [[clipping tool]] to shape them like depicted in the picture below. Tie all of these brushes to a <code>[[func_detail]]</code> entity.


=== Shaft Slopes ===
[[Image:Box_dropper_funnel.jpg|right|thumb|300px|The sloped brushes]]


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


<gallery>
{{clr}}
Image:Box_dropper_funnel.jpg|The sloped brushes
</gallery>


== Implementation ==
== Implementation ==
=== Step 1 ===
Place the dropper in the ceiling above where the box should drop.
Place the dropper in the ceiling above where the box should drop.


=== Step 2 ===
=== Box Setup ===
Set up a trigger to send the ''Trigger'' input to the <code>logic_drop_box</code> entity. This can be done in numerous ways, such as using a <code>[[logic_auto]]</code> to make the box drop at the start of the map, a <code>[[trigger_once]]</code> to have the box drop when the player enters the room, or a <code>[[trigger_look]]</code> to make the box drop when the player is looking at the dropper.
Set up a trigger to send the ''Trigger'' input to the <code>logic_drop_box</code> entity. This can be done in numerous ways, such as using a <code>[[logic_auto]]</code> to make the box drop at the start of the map, a <code>[[trigger_once]]</code> to have the box drop when the player enters the room, or a <code>[[trigger_look]]</code> to make the box drop when the player is looking at the dropper.


=== Step 3 ===
=== Box Respawn ===
If there are [[Emancipation Grid|fizzlers]] or [[Creating poison water|goo]] in the map, the box must be set up to respawn if it can be lost. For fizzlers, add a ''OnDissolveBox'' output that triggers <code>logic_drop_box</code> to the <code>[[trigger_portal_cleanser]]</code> entity.
If there are [[Emancipation Grid|fizzlers]] or [[Creating poison water|goo]] in the map, the box must be set up to respawn if it can be lost. For fizzlers, add a ''OnDissolveBox'' output that triggers <code>logic_drop_box</code> to the <code>[[trigger_portal_cleanser]]</code> entity.


To make the box respawn if it's lost in goo, create a <code>trigger_multiple</code> within the goo volume with its filter set to <code>filter_boxes</code>, the ''Physics Objects'' flag set, and with the following outputs:
To make the box respawn if it's lost in goo, create a <code>trigger_multiple</code> within the goo volume with its filter set to <code>filter_boxes</code>, the ''Physics Objects'' flag set, and with the following outputs:
Line 113: Line 129:
|}
|}


== See Also ==
[[Category:Level Design Tutorials]][[Category:Portal]]
* [[Dropper (Portal 2)]] - Portal 2 variant
 
[[Category:Level Design Tutorials]]
[[Category:Portal]]

Revision as of 17:25, 28 July 2021

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 aparatus 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 and disable the shadows.

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

The arch, vertex manipulated and textured

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

Next 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/metalwall61f. 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. 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.

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 set its name to trigger_box_dropper_clear, set its Start Disabled keyvalue to Yes and set its Filter Name to "filter_boxes". Go to its flags and make sure the Physics Objects flag is checked and the Client flag is unchecked. 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.

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 logic_auto to make the box drop at the start of the map, 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 goo 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