Discouragement Field: Difference between revisions
m (grammar) |
No edit summary |
||
Line 2: | Line 2: | ||
The '''Discouragement Field''' or ''' | 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. | ||
== Instance == | == Instance == | ||
[[File:Death field 1280.jpg|thumb|right| | [[File:Death field 1280.jpg|thumb|right|Laser Field example.]] | ||
* Download these two instance files: [http://nuclearvelocity.com/barracuda/downloads/portal2/instances/death_field_128x128.vmf death_field_128x128.vmf] and [http://nuclearvelocity.com/barracuda/downloads/portal2/instances/death_field_256x256.vmf death_field_256x256.vmf] and put them into your instance folder under ''instances\gameplay''. (If only text comes up and you can't download it, press ctrl+A, copy it, paste it in Notepad, and save as death_field_128x128.vmf under All Files (for the 128x128 one)). | * Download these two instance files: [http://nuclearvelocity.com/barracuda/downloads/portal2/instances/death_field_128x128.vmf death_field_128x128.vmf] and [http://nuclearvelocity.com/barracuda/downloads/portal2/instances/death_field_256x256.vmf death_field_256x256.vmf] and put them into your instance folder under ''instances\gameplay''. (If only text comes up and you can't download it, press ctrl+A, copy it, paste it in Notepad, and save as death_field_128x128.vmf under All Files (for the 128x128 one)). | ||
Line 29: | Line 29: | ||
Alright, for this tutorial we're going to create a | Alright, 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. | 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". [[File:Laserplance tex.jpg|thumb|right|Click for preview.]] | 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". [[File:Laserplance tex.jpg|thumb|right|Click for preview.]] | ||
Line 43: | Line 43: | ||
|} | |} | ||
Now, we want the | Now, we want the Laser Field to kill the player when they try to pass through it. | ||
For this, create a 128w | For this, create a 128w 1l 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: | ||
::{| class=standard-table | ::{| class=standard-table | ||
! Property Name || Value | ! Property Name || Value | ||
Line 61: | Line 61: | ||
[[File:deathfield_models.jpg|thumb|right|Click for preview.]] | [[File:deathfield_models.jpg|thumb|right|Click for preview.]] | ||
Now create | Now create an [[ambient_generic]] and place it roughly in the middle of the brush. | ||
Use the following settings: | Use the following settings: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 69: | Line 69: | ||
|- | |- | ||
| Sound Name || Laser.BeamLoopMega | | Sound Name || Laser.BeamLoopMega | ||
|- | |||
| Volume || 8 | |||
|- | |- | ||
| SourceEntityName || deathfield1_brush | | SourceEntityName || deathfield1_brush | ||
|} | |} | ||
The flags '''Start silent''' and '''Is NOT looped''' must be disabled! | 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 possibilty 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: | |||
Alright, the | |||
For this example we will use a [[prop_floor_button]]. Name it something like | |||
::{| class=standard-table | ::{| class=standard-table | ||
! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ||
Line 109: | Line 98: | ||
|} | |} | ||
Congratulations! You have created a fully funcional | Congratulations! You have created a fully funcional Laser Field for use in your map! | ||
[[Category:Portal 2 Level Design]] | [[Category:Portal 2 Level Design]] | ||
[[Category:Portal 2 Tutorials]] | [[Category:Portal 2 Tutorials]] |
Revision as of 22:44, 10 December 2012
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.
Instance
- Download these two instance files: death_field_128x128.vmf and death_field_256x256.vmf and put them into your instance folder under instances\gameplay. (If only text comes up and you can't download it, press ctrl+A, copy it, paste it in Notepad, and save as death_field_128x128.vmf under All Files (for the 128x128 one)).
- Create a new func_instance in your map, select VMF Filename and click Browse... on the right and select one of the two death field instances.
- The Discouragement Field is now ready and active on default. If you want to activate or deactivate the field, follow these steps:
- Give the func_instance a name (Fix Up Name), for example
death_field_1
. - Create a trigger or button somewhere and give it these outputs:
- Give the func_instance a name (Fix Up Name), for example
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnTrigger | death_field_1 | instance:enable;Trigger | <none> | 0.00 | No |
(for activation)
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnTrigger | death_field_1 | instance:disable;Trigger | <none> | 0.00 | No |
(for deactivation)
Manual Creation
Alright, 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 a 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 1l 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 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 Laser.BeamLoopMega Volume 8 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 possibilty 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 funcional Laser Field for use in your map!