Dropper (Portal 2)

From Valve Developer Community
Jump to: navigation, search
English (en)Русский (ru)Translate (Translate)
Dropboxicon.png

A dropper is a puzzle element in Portal 2. Objects like gel and cubes fall out of it. It can be hooked up to a button, among other possible input devices.

Creating Droppers

1. Create a func_instance entity with the following properties:

Property Name Value
Fix up Name box_dropper
VMF Filename instances/gameplay/cube_dropper_multiple_normal.vmf

If the cube dropper doesn't show up then save and reload so you can position it properly.

2. Align the bottom of the upper, rectangular section of the dropper (just above the cylindrical part) with the ceiling of your map.

Dropper-ceiling.png

The square may flash due to z-order issues with the ceiling. Then use the Clipping tool to cut a square out of your ceiling where the flashing square is. This will allow the cube to fall through. Once you've isolated the square piece of texture in your ceiling, go ahead and delete it. Be sure not to make the hole too big, or you'll have leaks.

3. Create the entity you want to activate the cube dropper (i.e. a trigger_once at the entrance to the room) and give it the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger box_dropper instance:cube_dropper;Trigger 0.00 No
Io11.png OnTrigger box_dropper instance:cube_dropper_autorespawn;Enable 0.00 No
Note.pngNote:Hammer may indicate that these are invalid. Don't worry about it.

List Of Instances

There are different instances for each kind of dropper, and several different designs. Just substitute the kind you need for the VMF Filename parameter above. Be aware, however, that some of these instances were made for special, one-time, in-game scenes or were leftovers from the development stages, and may be buggy. All files are under instances\gameplay\.

Item, parameters Dropper style VMF Filename
prop_weighted_cube, Standard Small, modern cube_dropper_dropontrigger_normal.vmf
prop_weighted_cube, Standard Small, modern cube_dropper_multiple_normal.vmf
prop_weighted_cube, standard Small, modern cube_dropper_normal.vmf
prop_weighted_cube, Standard Long, exposed tube cube_dropper_large.vmf
prop_weighted_cube, Standard Long exposed tube, dirty cube_dropper_large_dirty.vmf
prop_weighted_cube, Reflector Small, modern reflectocube_dropper_dropontrigger_normal.vmf
prop_weighted_cube, Reflector Small, modern reflectocube_dropper_multiple_normal.vmf
prop_weighted_cube, Reflector Long, exposed tube reflectocube_dropper_large.vmf
prop_weighted_cube, Reflector Long exposed tube, dirty reflectocube_dropper_large_dirty.vmf
prop_weighted_cube, Sphere Small, modern sphere_dropper_dropontrigger_normal.vmf
prop_weighted_cube, Sphere Small, modern sphere_dropper_multiple_normal.vmf
prop_weighted_cube, Sphere Long, exposed tube sphere_dropper_large.vmf
prop_weighted_cube, Sphere Long exposed tube, dirty sphere_dropper_large_dirty.vmf
prop_weighted_cube, Sphere Small, modern item_dropper.vmf
Gel, Water Small, modern paint_dropper_erase.vmf
Gel, Bounce Small, modern paint_dropper_bounce.vmf
Gel, Speed Small, modern paint_dropper_speed.vmf
Gel, Stick (Reflection Gel) Small, open tube paint_dropper_stick.vmf
Gel, $paint_type Small, modern paint_dropper.vmf
prop_monster_box, walking Normal with music cube_dropper_a4.vmf
prop_monster_box, hiding Normal with music cube_dropper_a4_box.vmf
prop_monster_box, walking Normal with no tube cube_dropper_monster.vmf
prop_monster_box, hiding Normal with no tube cube_dropper_monster_box.vmf
Generic, whatever is placed in it Big box with opening cube_dropper_pendleton.vmf
prop_weighted_cube, $paint_type, Wet Small, modern paint_bomb_dropper_modern.vmf
prop_weighted_cube, Bounce, Dry Small, bare tube paint_bomb_dropper_bounce.vmf
prop_weighted_cube, Speed, Dry Small, bare tube paint_bomb_dropper_speed.vmf
prop_paint_bomb, $paint_type, $bomb_type Portal 1 Style paint_bomb_dropper.vmf
prop_paint_bomb, $paint_type, $bomb_type Dirty paint_bomb_dropper_auto.vmf
People, used in co-op maps Big box with opening cube_dropper_player.vmf

Manual Creation of Cube Droppers

Creating your own cube droppers is actually easier than you might think it to be. In fact, compared to the standard and PTI instances, this method of making cube droppers uses far fewer entities in general. You'll need:


To get an idea for precise placement of everything, check out the VMF instance instances/gameplay/cube_dropper_shared.vmf.

For the env_entity_maker, set these keyvalues:

Property Name Value
Name cube_dropper_spawner
Point_template To Spawn cube_dropper_template

For the filter_activator_class, set these keyvalues:

Property Name Value
Name filter_weighted_cube
Filter Classname prop_weighted_cube or prop_monster_box

For the func_brush, set these keyvalues:

Property Name Value
Name cube_dropper_clip
Disable shadows Yes

For the logic_auto, set these outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnMapSpawn cube_dropper_spawner ForceSpawn 1.00 No

For the point_template, set these keyvalues:

Property Name Value
Name cube_dropper_template
Template 1 cube_dropper_box

For the prop_dynamic, set these keyvalues:

Property Name Value
Name cube_dropper_prop
World Model models/props_backstage/item_dropper.mdl

If using a prop_monster_box, set these keyvalues:

Property Name Value
Name cube_dropper_box
Start as Box Yes

Otherwise, if using a prop_weighted_cube just set the name.

If you want your dropper to auto-respawn, also add this output to the cube:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnFizzled cube_dropper_trigger Enable 0.00 No

And finally, for the trigger_multiple, set these keyvalues, flags, and outputs:

Property Name Value
Name cube_dropper_trigger
Filter Name filter_weighted_cube
Flag Enabled?
Clients No
Physics Objects Yes
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch cube_dropper_prop Skin 1 0.00 No
Io11.png OnStartTouch cube_dropper_prop SetAnimation item_dropper_open 0.00 No
Io11.png OnStartTouch cube_dropper_prop SetDefaultAnimation item_dropper_idle 0.10 No
Io11.png OnStartTouch cube_dropper_clip Disable 0.30 No
Io11.png OnEndTouchAll cube_dropper_prop Skin 0 1.30 No
Io11.png OnEndTouchAll cube_dropper_prop SetAnimation item_dropper_close 0.00 No
Io11.png OnEndTouchAll cube_dropper_prop SetDefaultAnimation item_dropper_idle_closed 0.10 No
Io11.png OnEndTouchAll cube_dropper_clip Enable 0.00 No
Io11.png OnEndTouchAll !activator AddOutput OnUser1 !self:Dissolve:0:0:1 0.00 No
Io11.png OnEndTouchAll !self Disable 0.00 No
Io11.png OnEndTouchAll cube_dropper_spawner ForceSpawn 1.50 No
Tip.pngTip:Outputs for other aesthetic details, such as lighting, may be added here.

If using a prop_monster_box, you'll also need to add one more output:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnEndTouchAll cube_dropper_box BecomeMonster 0.00 No

Finally, on an input device such as a prop_button, add these outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed cube_dropper_box FireUser1 0.00 No
Io11.png OnPressed cube_dropper_trigger Enable 0.00 Yes
Note.pngNote:If you want to disable auto-respawn, set the second output to fire infinitely (i.e. "Only Once" is "No" instead of "Yes").

If you want to auto-drop the first cube, relocate the second output to a trigger_once instead.

Droppers with a pre-placed cube

For this, you'll need a cube and a cube dropper of the same type.

If you don't have auto-respawn on and have a button for the dropper:

  1. Create your cube and give it a name.
  2. Create your button and set it to drop a cube when pressed.
  3. Set up an additional output for the button: to fizzle (dissolve) your pre-placed cube when pressed.

If you have auto-respawn on and no button for the dropper:

  1. Create your cube and set it to drop a cube when fizzled.
  2. That's it!

The advantage that this has is that now you can (for example) place a cube up high on a ledge but have the dropper in the middle of the room so that the player doesn't have to go through the tedium of retrieving the cube again. You might also use it to bring the cube a bit closer to the players when they enter an area while leaving the dropper a bit further away.

Manual Creation of Gel Droppers

Interestingly, all gel isn't always dispensed in the same way at Aperture. Sometimes it's a flow, and other times it's a great, big ball of gel. The former can easily be accomplished by using the info_paint_sprayer entity, but the latter requires the use of the prop_paint_bomb entity and some additional stuff. In either case, you can set the type of gel you want to use.

To make your own gel dropper using a prop_paint_bomb, you'll need:


For the env_entity_maker, set these keyvalues and outputs:

Property Name Value
Name gel_dropper_spawner
Point_template To Spawn gel_dropper_template
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnEntitySpawned gel_dropper_control_rl Disable 0.00 No
Io11.png OnEntitySpawned gel_dropper_control_rl CancelPending 0.00 No

For the first logic_relay, set these keyvalues and outputs:

Property Name Value
Name gel_dropper_spawner_rl
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger gel_dropper_spawner ForceSpawn 0.50 No

For the second logic_relay, set these keyvalues and outputs:

Property Name Value
Name gel_dropper_control_rl
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger gel_dropper_spawner_rl Trigger 0.00 No

For the point_template, set these keyvalues:

Property Name Value
Name gel_dropper_template
Template 1 gel_dropper_bomb

For the prop_paint_bomb, set these keyvalues and outputs:

Property Name Value
Name gel_dropper_bomb
Paint Type <Select accordingly for your puzzle>
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnExploded gel_dropper_spawner_rl Trigger 0.10 No
Io11.png OnExploded gel_dropper_control_rl Enable 0.10 No

Finally, on an input device such as a floor button, set these outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed gel_dropper_spawner_rl Enable 0.10 No
Io11.png OnPressed gel_dropper_control_rl Trigger 0.20 No
Io11.png OnUnPressed gel_dropper_spawner_rl Disable 0.00 No
Io11.png OnUnPressed gel_dropper_spawner_rl CancelPending 0.00 No


This design allows for any input device to control the gel dropper while at the same time being virtually unbreakable by spamming input.