Portal 2

Portal 2

Not enough ratings
p0rtalmaster's Hammer Guide Series Part 09/19
By The Sojourner
Hello and welcome to part 09/19 of my series of mini-guides, designed to help you learn perhaps what is the biggest part of the Portal 2 Authoring tools: Hammer.

For a super-quick version of this series, please check out my other guide, Hammer for the Flustered.
   
Award
Favorite
Favorited
Unfavorite
Intro
Finally, I'll show you the I/O and such of how to control many testing elements. This includes lasers, hard light bridges and tractor beams. I'll even show you how to create a paint pipe.
How to Control the Elements
Our example output device will be a 1500 Megawatt Heavy-Duty Super-Colliding Super-Button...again.

Lasers (env_portal_laser; call/name this something like laser1):



Don't forget, as with laser catchers, lasers will need a 64×64 hole in the wall specially cut out for it.
Hard Light Surfaces
These bridges are made from natural light that I pump in from the surface....
~ GLaDOS

There's not really much to do with this one. The main entity to use is prop_wall_projector. It can be rotated and positioned horizontally, vertically, or even at an angle. It can be coated with repulsion or propulsion gel, but not reflection gel (since lasers can go through hard light surfaces) nor conversion gel (since you can shoot portals through those same blue surfaces). It can be enabled and disabled much like the laser can, and despite the fact that it can set your hair on fire, the hard light surface is actually one of Aperture Science's safest testing elements.

Hard Light Bridges (prop_wall_projector; call/name this something like bridge1):



Special keyvalues include "Start Enabled" (fairly self-explanatory) and "Disable Placement Helper." The latter option is useful for if you have a custom portal placement thingie (i.e. an info_placement_helper), perhaps to make angled/sideways portals on a wall.

NB hard light bridges can just be tacked onto any wall and look just fine. Just make sure they're not floating off the wall by something like 1 unit.
Excursion Funnels
These chuming beams of asbestos are carriers for anything and everything. They will stop any object that goes in its path, no matter how fast said object is going. History has it that they were developed to see how trust was affected when test subjects were subjected to be carried inside one of these things. Unfortunately, being made of asbestos, there were high rates of heart failure. Nothing to worry about though...

Excursion Funnels (prop_tractor_beam; call/name this something like tbeam1):



Special keyvalues include "Start Enabled" (fairly self-explanatory), "Disable Placement Helper" and "Use 128 model." The latter keyvalue got introduced ever since PeTI began, when 128×128 excursion funnels were needed to replace the 192×192 models.

Another special keyvalue is the "Linear Force" keyvalue, along with the SetLinearForce input, which controls the speed and direction of the excursion funnel:
  • Higher than 250: forward and fast.
  • 250: forward (blue); default option.
  • ~10 – 200: forward and slow.
  • 0: effectively off.
  • ~-10 – -200: reverse and slow.
  • -250: reverse (orange).
  • Lower than -250: reverse and fast.
It's best in general to just use 250 and -250 for the Linear Force. Excursion funnels also need a special hole. Fortunately, there are several instances:
  • instances\gameplay\tractorbeam_frame_black.vmf
  • instances\gameplay\tractorbeam_frame_black_dirty.vmf
  • instances\gameplay\tractorbeam_frame_white.vmf
  • instances\gameplay\tractorbeam_frame_white_dirty.vmf
These should cover many themes where the excursion funnel is used. If not, these can be retextured (just like door frames or button bases) and saved as a new instance.
Paint Pipes
These were used mostly in those old, underground testing spheres, but they have been brought up to the chambers that slide along rails that were once under Wheatley's control. The key entity is the info_paint_sprayer entity, but before we begin, there are a couple of things that need to be done:

1) Go to "Map Properties" and set "Paint in Map" to "Yes." Otherwise the physics system will not work, nor will paint render.
2) Make sure you have some light entities (e.g. light, light_spot or similar) in your map. This is because rendering gel on surfaces is in part based on the lightmap.

First, the info_paint_sprayer's keyvalues and I/O; a button will once again be used to control the info_paint_sprayer (call/name this something like painter1):



Keyvalues to check:
  • Start Active? — Yes or No.
  • Paint Type — Select from "Bounce" (repulsion gel), "Stick" (old name; it's reflection gel now), "Speed" (propulsion gel), "Portal" (conversion gel), and "Erase" (probably just water that's been renamed "cleansing gel").
  • Render Mode — select from "Blobulator" or "Fast Sphere." The latter is used for dripping paint whereas the former is used for dropping big amounts of paint, as in the testing spheres.
  • Ambient Sound — select from "None (silent)", "Drip" (used with dripping paint, but don't use if the paint drips a lot/rapidly), "Medium Flow" and "Heavy Flow."
  • Blobs per second — pretty self-explanatory. Low values are good for dripping paint whereas higher values such as 80 are good for medium flow.
  • ... and a whole bunch of other options to fine-tune the spread and streaking of gel.
There is also a special input ChangePaintType: 0 is "Bounce", 1 is "Stick", 2 is "Speed", 3 is "Portal", and 4 is "Erase". This is yet another awesome thing about working with Hammer: the power to change the type of gel that comes out of the pipe. Food for thought for the (aspiring) Portal 2 puzzlists out there.



Now, we'll need our info_paint_sprayer and a couple of prop_statics. For decoration, there are many tube paint props, all beginning with props_underground/tube_paint_*. Some of the less-purely-decorative models:
  • models\props_underground\tube_paint_interior_cap.mdl (critical to avoid weirdness should the player ever look up inside the pipe)
    → TIP: set its color to match the color of the gel you're using.
  • models\props_underground\underground_paintdropper.mdl
    Skins: 0 for conversion gel, 1 for cleanser, 2 for propulsion gel, and 3 for repulsion gel.
  • Some other paint pipe model such as models\props_underground\tube_paint_128a.mdl
    → TIP: set its color to match the color of the gel you're using.
Note: you can also use models\props_ingame\paint_dropper.mdl, which is used in all standard PeTI maps.

The first model (the "interior cap") goes inside of the paint pipe and at its base, so as not to cover up any gel and basically make everything look weird.

Place your info_paint_sprayer inside so that it seems like gel is coming out of the pipe. Lastly, set the settings of your info_paint_sprayer to fit the needs of your puzzle and set these I/O to make it work:



Note: in Valve's maps and all PeTI maps, two info_paint_sprayers are used, in slightly different locations in the pipe (one is behind the other).
Mistakes to Avoid & More Information

  • Not using a hole for the laser. Believe it or not, it looks weird when all we see is a frame nested into a wall (or worse, the floor).
  • Not using a hole for the excursion funnel. Again, it looks weird when all we see is a round white frame nested into the floor or wall. In fact it looks less plausible than with a laser. On the bright side, hard light bridges don't need a hole!
  • Not using pipes for your info_paint sprayer. Details are important, let's not forget.
  • Using too many cameras or turrets in your map. Chances are I probably didn't even have to tell you the entity and you understood how to create one (yes, it's that easy :P). Yes, we get it already, but you'll be better if you learn how to use these things logically and moderately. Try making friends with companion cubes and buttons instead of turrets.

More information from the VDC Wiki:
Master Guide List
Please note that there are still some works in progress. This section will be updated as I finish more guides for you!

You are currently viewing part 09/19 in the series.

| 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

Previous Guide (about the Aperture Science Aerial Faith Plate)
Next Guide (about fizzlers, laserfields and other "moat" areas)

Please feel free to leave a well-reasoned question or comment below. Either I or a qualified Test Chamber Associate (you'll know because they make all the good maps on the workshop) will respond. If your question or comment is not well-reasoned, I recommend reading over my guides again until you understand them 100%. No further information is required here or will be provided, and you will become an excellent Test Chamber Designer — using Hammer!

7 Comments
parking lot snow pile 1 Mar, 2024 @ 2:46pm 
In my experience about half of that guide is disabled lol
The Sojourner  [author] 17 Feb, 2024 @ 2:45pm 
Yup! Actually you can click on "Formatting Help" to see what formatting tags are allowed where on Steam (e.g. lists and tables don't work in these comments, but they work in, say, the text of a guide).
parking lot snow pile 17 Feb, 2024 @ 9:35am 
You can use italics in steam comments?
The Sojourner  [author] 13 Feb, 2024 @ 9:29pm 
" ...I think she's lying... "
Wj11jam 13 Feb, 2024 @ 8:46pm 
The enrichment centre regrets to inform you that this next tutorial is impossible. Make no attempt to follow it.
NootNootG4 23 Jun, 2021 @ 7:07pm 
hdhdhdgr:jarate::steamfacepalm::steambored::demoticon:
parking lot snow pile 22 Jun, 2021 @ 7:22pm 
This is a godsend. Would like to know the colors for the gels without decompiling maps though. Valve used 0 165 255 RGB code for pipe colors for blue gel for example