User:Mattshu/sandbox

From Valve Developer Community
Jump to navigation Jump to search

Template:Wrongtitle

Todo: Add pictures

Portal 2 This tutorial will walk you through the basics of adding a laser beam with nodes and a receiver to your Portal 2 map.

Note.pngNote:This tutorial is currently using an alternate method to create Portal 2 maps. Some entities must be manually written in Hammer. This will most likely need updated once the official SDK is released.

Creating the beam

First you'll need to create the base for the laser. If you're attaching the laser to the wall, you'll need a 64 x 64 x 32 space in the wall.

Then create a new entity named env_portal_laser and create the following keyvalues:

Key Value
StartState 0
angles 0 90 0
skin 0
AutoAimEnabled 1
model models/props/laser_emitter_center.mdl
drawinfastreflection 0
LethalDamage 0
Note.pngNote:These were the default values as found in Portal 2's official map sp_a2_column_blocker. The only value you need to worry about changing is angles.

Using Hammer's handles (the X marks you see that shows the center of a brush), line up the new entity inside your hole. Make sure the laser is pointing in the direction you'd like it to.

Creating laser nodes