Разрушаемые стены

From Valve Developer Community
< Ru
Jump to navigation Jump to search
English (en)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)
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)

There are some walls in Left 4 Dead that the infected can break to surprise the survivors. For example, in the hospital, at the elevator, there are a few walls that break to allow the infected to come into the area.

There's also an example in the tutorial_standards.vmf map.

An example of a breakwall in the tutorial_standards map.

Создание func_breakable

Создание элементов карты для разрушаемой стены.

Start by creating a brush for the wall in the Block Tool.

The wall will need to fit into an existing wall in your level.

Создайте элемент карты следующих размеров:

  • 128 единиц длины
  • 16 единиц толщины
  • 128 единиц высоты
Свойства объекта func_breakable.

Press Ctrl+T to turn the brush into a brush entity.

The properties window will appear.

Change the Class to "func_breakable" and click on the Apply (Применить) button.

Changing the Breakable by field to All Infected.

Change the Material Type to "Wood".

Change the Breakable by to "Infected".

Вкладка Признаки объекта func_breakable.

Switch to the Flags (Признаки) tab.

Make sure that none of these boxes are checked unless you want the wall only to be broken when it receives an input by some other entity in the world.

Вкладка Выходы объекта func_breakable.

Switch to the Outputs (Выходы) tab.

Add an output with the following:

  • My output (Имя выхода): "OnBreak"
  • Targets entities named (Целевой объект): "breakwall_decal"
  • Via this input (Через этот вход): "Activate"

We will later add decals to turn on so that the edge of the solid wall will not look too straight.

Click on Apply (Применить) and close the properties window.

Lifting and transferring the alignment of the wall to the func_breakable wall.

Position the func_breakable wall in the space in the wall where you want the infected to come out from.

Go into the Texture Application Mode.

With the Face Edit Sheet window up, in the Camera viewport, Alt+LMB on the wall that is solid. This samples the texture and the alignment of that brush face.

Continue holding the Alt key down and RMB click on the func_breakable wall face that is next to the wall that is solid to align the textures up properly. Alt+RMB clicking transfers the texture and alignment of the sampled face.

Добавления модели разрушенной стены

Go to the Entity Tool and select "prop_static" from the Objects (Типы) list.

Place the prop_static in the Camera viewport next to the func_breakable wall.

Open its properties.

Click on the World Model row and click the Browse button on the right side.

Type "breakwall" in the filter.

Select the model "props_interiors/breakwall_interior.mdl"

Выбор модели разрушенной стены.

Click OK.

Свойства объекта статичного реквизита разрушенной стены.

Change Disable Shadows to "Yes".

Click on Apply (Применить) and close the window.

Position the prop_static inside the func_breakable.

Размещение модели разрушенной стены внутри стены из func_breakable.

This model will be revealed when the func_breakable brush entity is destroyed.

Размещение наклеек

Свойства объекта наклейки.

Go to Entity Tool and select "infodecal" from the Objects (Типы) list.

Place it in the Camera viewport on the wall that doesn't break on the left of the breakwall.

Open its properties with Alt+↵ Enter.

Текстура overlays/breakwall.

Change the Name to "breakwall_decal".

Click on the texture row and click on the Browse button on the right side to bring up the texture browser.

Type "overlays" in the filter.

Select the texture "overlays/breakwall".

Подгонка положения наклейки.

Double-click on the texture to make it the infodecal's texture.

Click on Apply (Применить) and close the window.

Position the infodecal so that it shares the same plane as the wall that the func_breakable is set in.

Текстура overlays/breakwall_mirror.

Select the infodecal and duplicate it (⇧ Shift+→ key).

Position it on the right side of the func_breakable.

Open its properties.

Click on the texture row and click on the Browse button on the right side.

Type "overlays" in the filter.

Select "overlays/breakwall_mirror".

Double-click on the texture to set it in the info_decal properties.

Click Apply (Применить) and close the window.

This will cover the straight edge of the right side of the wall.

Обновление навигационного графа

Recreate the nav area through this breakwall so that the infected can walk through the prop_static cleanly.

Появилось поле навигационного графа на месте разрушаемой стены.
Tip.pngСовет: You can break the wall to test it in your level by looking at the wall and then typing this in the console: ent_fire !picker break