Dieser Artikel bezieht sich auf das Spiel "Portal 2". Klicke hier für weitere Informationen.

Discouragement Field

From Valve Developer Community
< De
Revision as of 19:29, 23 November 2024 by Raengeel (talk | contribs) (Created page with "{{subst:#if: Translation of 'Discouragement Field' to 'Deutsch' via Template:LanguageBar buttons...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{subst:#if:|||

Important step for replacing wikilinks after you've created this page

After you click 'Edit' do what the image shows. If you can't see editing toolbar you need to enable it in 'Preferences' -> Editing -> checkbox 'Enable the editing toolbar'

Preload - Language Links Replace.jpg
Siehe auch:  {{LAuto}}

--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---

SEARCH FOR: \[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special|)(?:[^\|\]]+))(\|?.*?)\]\]

REPLACE WITH: {{subst:LAuto|$1$2}}

}}
Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Deutsch (de)Français (fr)Русский (ru)Translate (Translate)
Multiplediscouragementbeamsicon.png

Portal 2 The Discouragement Field or Laser Field is a special energy field in Portal 2 which blocks only the player (instantly killing them), not other objects. It can be considered as the counterpart to the Emancipation Grid.

Manual Creation

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".
Click for preview.
Note.pngBemerkung:I recommend that, after you hit "Fit", you also align it to the top, as well as adding 256 to the 'Y' axis. This will add to the visual effect by removing the annoying yet very common gap in the middle part of the field.

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".

Click for preview.

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:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed deathfield1_brush Disable 0.00 No
Io11.png OnPressed deathfield1_trigger Disable 0.00 No
Io11.png OnPressed deathfield1_sound StopSound 0.00 No
Io11.png OnPressed deathfield1_light TurnOff 0.00 No
Io11.png OnUnPressed deathfield1_brush Enable 0.00 No
Io11.png OnUnPressed deathfield1_trigger Enable 0.00 No
Io11.png OnUnPressed deathfield1_sound PlaySound 0.00 No
Io11.png OnUnPressed deathfield1_light TurnOn 0.00 No

Congratulations! You have created a fully functional Laser Field for use in your map!