User:Mattshu/sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (lol. wow. turns out I was running Alien Swarm SDK with the Alien Swarm game selected instead of Portal 2. No wonder those entities weren't showing up. Re-written and facepalming for stupidity.)
Line 5: Line 5:
{{todo|Add pictures}}
{{todo|Add pictures}}


{{note|This tutorial is currently using [http://www.moddb.com/games/portal-2/tutorials/getting-setup-for-portal-2-mapping 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.}}
{{note|This tutorial is currently using [http://www.moddb.com/games/portal-2/tutorials/getting-setup-for-portal-2-mapping an alternate method] to create Portal 2 maps. This might need updated once the official SDK is released.}}


= Creating the beam =
= Creating the beam =
Line 11: Line 11:
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.
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:
Then create an '''env_portal_laser''' entity.
 
:{| {{standard-table}}
! Key || Value
|-
| StartState || 0
|-
| angles || 0 90 0
|-
| skin || 0
|-
| AutoAimEnabled || 1
|-
| model || models/props/laser_emitter_center.mdl
|-
| drawinfastreflection || 0
|-
| LethalDamage || 0
|-
|}
{{note|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 the relay =
= Creating the relay =
Line 39: Line 17:
This also requires a ''64 x 64 x 32'' hole.
This also requires a ''64 x 64 x 32'' hole.


Create a new entity and name it '''prop_laser_relay''' with the following keyvalues:
Create a '''prop_laser_relay''' entity.
 
:{| {{standard-table}}
! Key || Value
|-
| angles || 0 0 0
|-
| model || models/props/laser_receptacle.mdl
|-
| targetname || ''name of the catcher (required for logic entities)''
|-
| vscripts || laser_target/musical_laser_catcher.nut
|-
|}
{{note|Once again, these are the defaults taken from the Portal 2 map as mentioned above. Feel free to play with the values. With an angle of 0 0 0, the laser relay will be placed facing up.}}
 
As done before, line up the entity with Hammer handles, but raise it so it will be lined up with the real floor surface.


= Creating the catcher =
= Creating the catcher =
Line 61: Line 23:
Once again, create the standard ''64 x 64 x 32'' hole in your wall.
Once again, create the standard ''64 x 64 x 32'' hole in your wall.


Create a new entity and name it '''prop_laser_catcher''' with the following keyvalues:
Create a '''prop_laser_catcher''' entity.
 
:{| {{standard-table}}
! Key || Value
|-
| angles || 0 0 0
|-
| model || models/props/laser_catcher_center.mdl
|-
| skin || 0
|-
|}

Revision as of 20:16, 25 April 2011

Template:Wrongtitle

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

Todo: Add pictures
Note.pngNote:This tutorial is currently using an alternate method to create Portal 2 maps. This might 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 an env_portal_laser entity.

Creating the relay

This also requires a 64 x 64 x 32 hole.

Create a prop_laser_relay entity.

Creating the catcher

Once again, create the standard 64 x 64 x 32 hole in your wall.

Create a prop_laser_catcher entity.