The Discouragement Field or Laser Field is a special energy field in Portal 2 which blocks only the player, not other objects. It can be considered as the counterpart to the Emancipation Grid. However, contact with the field instantly kills the player.
For this tutorial we're going to create a Laser Field with a width of 128 units. Select the tools/toolsnodraw texture and create a 128w 1l 128h block brush.
Now click Shift + A to open the Texture Application Tool, select the front and the back face of the brush, apply the effects/laserplane texture and click "Fit".
Next, tie the brush to an entity by clicking the toEntity button on the lower right side of the Hammer Interface and make it a func_brush with the following settings:
Property Name Value Name deathfield1_brush Render FX Constant Glow Solidity Never Solid
Now, we want the Laser Field to kill the player when they try to pass through it. For this, create a 128w 2l 128h block brush that overlaps the first brush you made, apply the tools/toolstrigger texture to every face and make it a trigger_hurt with these settings:
Property Name Value Name deathfield1_trigger Damage 1000 Damage Cap 1000 Damage Type ENERGYBEAM
And of course, make sure the Clients flag is enabled, otherwise, it won't work.
To make it look like the lasers aren't just coming out of nowhere, create two prop_static entities. One to the left and one to the right of the Death Field brush. Select the model models/props/fizzler.mdl and set the skin to "2".
Now create an ambient_generic and place it roughly in the middle of the brush. Use the following settings:
Property Name Value Name deathfield1_sound Sound Name LaserGreen.BeamLoop Volume 4 SourceEntityName deathfield1_brush
The flags Start silent and Is NOT looped must be disabled!
Alright, the Laser Field itself is ready to be used in-game now, but for sure you want to use the possibility of turning it on and off in your map. For this example we will use a prop_floor_button. Name it something like "button" and create the outputs:
Congratulations! You have created a fully functional Laser Field for use in your map!