Ru/Creating Brush Entities: Difference between revisions

From Valve Developer Community
< Ru
Jump to navigation Jump to search
m (Multipage removal)
 
(26 intermediate revisions by 11 users not shown)
Line 1: Line 1:
__NOTOC__
{{LanguageBar|title = Создание энтити брашей}}
{{totranslate:ru}}
{| style="float:right"
|- valign="bottom"
| [[Image:Hammer_primitive_crate.png|thumb|center|Properly-sized cube with 32x32 texture.]] || {{first room menu}}
|}
In Hammer, a [[Primitives|Primitive]] is a relatively simple brush object.  Primitives can be world geometry or interactive entities subject to physics & damage. In this example, we will create an interactive primitive, subject to physics & damage in the map: specifically, a 32 unit [http://www.oldmanmurray.com/features/39.html crate].


# Select the [[Hammer Block Tool|Block Tool]] [[Image:hammer_block.png|28px]] and create a cube in your map.
# Open the [[Hammer_Texture_Browser|Texture Browser]] and [[Hammer_Texture_Browser#Filter|filter]] for '''dev crate'''.  '''Dev/dev_measurecrate02''' should be a 32x32 crate texture.
# Apply the '''dev/dev_measurecrate02''' texture to your cube. {{Note|If the grid on your 2D views is too large to get down to 32 units, press the <code>[</code> key or click the '''Smaller Grid''' button [[Image:Hammer_SmallerGrid.png]] to create smaller objects on the grid.}}
# Resize your cube using the [[Hammer Selection Tool|Selection Tool]] [[Image:hammer_select.png|28px]] until the texture fits properly on the cube. {{Note|To this point, creating primitives for world geometry and for interactive objects is the same.  In order to specify whether our crate is, indeed, world geometry or an interactive object, we must select it and move it either [[Hammer_New_Objects_Toolbar#toWorld_.3CCtrl.2BShift.2BW.3E|toWorld]] or [[Hammer_New_Objects_Toolbar#toEntity_.3CCtrl.2BT.3E|toEntity]].}}[[Image:hammer_toEntityButton.png|right|thumb|150px|'''toEntity''' button ('''Ctrl+T''')]]
# Select the crate using the [[Hammer Selection Tool|Selection Tool]].
[[Image:Hammer_object_properties.png|right|thumb|300px|func_breakable object properties]]
# Click the [[Hammer_New_Objects_Toolbar#toEntity_.3CCtrl.2BT.3E|toEntity]] button to tie a [[List_of_entities#Function_.28brush.29_entities|function]] to the primitive. This will bring up the [[Hammer_Object_Properties_Dialog|Object Properties]] dialog box.
# Select [[Func_breakable|func_breakable]] from the '''Class:''' drop-down menu.
# Under '''Keyvalues''', select '''Name''' and name your crate something descriptive.
# Under '''Keyvalues''', select '''Strength'''. The Strength value specifies how much damage the crate can take before breaking. Set the value to '''1'''.
# Under '''Keyvalues''', select '''Material Type'''. The material type specifies the sounds the crate will make and also what type of gibs it will break into.  Select '''Wood''' from the drop-down menu.
# Under '''Keyvalues''', select '''Physics Impact Damage Scale'''. This scales damage energy when the object is hit by a physics object. {{Note|A value of '''0''' means this feature is disabled. Set to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials.}}
# Click '''Apply''' and close the Object Properties dialog box.
<br style="clear:both">


==Crate Texture==
{{first room menu:ru}}
[[Image:Hammer_primitive_crate2.png|thumb|315px|left|Textured functional crate]]
Once our crate is correctly sized, we can apply a proper texture to it using the same technique we used previously.
# Open the [[Hammer_Texture_Browser|Texture Browser]] and [[Hammer_Texture_Browser#Filter|filter]] for '''crate'''.
# Select '''props/woodcrate001a''' and apply it to your cube.  You may have to use the Face Edit Sheet to fit the texture to the cube. {{Note|Ensure that the texture is aligned to '''Face'''.}}


Мы уже {{L|Basic Construction|создавали браши}}. Существует и другой взгляд на браши: '''{{L|brush entity}}'''.


<br style="clear:both">
В этом примере, мы будем создавать браш, который действует в качестве выдвигающейся двери. Когда игрок коснется браша, он (браш) поднимется в воздух, а затем опустится снова.
==External Links==
*[http://vadear.com/forums/showthread.php?t=60 Creating Basic Primitives. On Vadear.com]
{{Navbar:ru|Creating a Room|Your First Map|Adding Entities}}


{{otherlang:ru}}
[[File:Door basic.png|thumb|none|Базовая {{L|func_door}} энтити.]]
{{otherlang:ru:fr|Applying Textures:fr}},
{{otherlang:ru:zh-cn|Applying Textures:zh-cn}}


[[Category:Level Design Tutorials]]
== Конструкции ==
 
# Выберите {{hammer block}} и создайте новый браш размерами 128x128x16. {{tip|Если сетка Hammer'а слишком большая, чтобы сделать браш размером 16 юнитов, нажмите {{key|[}} или кликните на '''Smaller Grid''' [[File:Hammer SmallerGrid.png|link=]], чтобы сделать ее меньше.}}
# Сделайте ваш браш entity объектом, используя {{key|Ctrl+T}} или кнопку [[Hammer New Objects Toolbar#toEntity_(Ctrl+T)|toEntity]] <p>[[File:Hammer toEntityButton.png|border|Hammer toEntity button|link=]]</p>
# Это действие откроет диалог {{L|Hammer Object Properties Dialog|Object Properties}}:<p>[[File:Hammer object properties.png|400px|Object properties dialog]]</p> {{tip|Если вам необходимо вызвать диалог снова, после его закрытия, выберите ваш браш и нажмите {{key|Alt+Enter}}.}}
# Выберите {{L|func_door}} из выпадающего меню "Class", которое находится наверху-слева, и нажмите "Apply".
# В нижней части основного "Keyvalues" списка, найдите "Move Direction". Измените значение на <code>-90 0 0</code> или выберите "Up" из выпадающего меню, расположенного слева от черного круга.
# Нажмите "Apply" снова, затем закройте диалог Object Properties.
 
Теперь вы можете скомпилировать карту и проверить как работают двери.
 
== Завершение ==
 
Откройте {{L|Hammer Texture Browser|Texture Browser}} и найдите "door", используя [[Hammer Texture Browser#Filter|filter]]. Выберите материал который вам нравится, и примените его на браш. Кроме того, можно построить стену, которая соединяет дверь с краями вашей карты.
 
[[File:Decorated door.jpg|400px|thumb|none|Но не стоит слишком увлекаться!]]
 
{{Navbar otherlang|Adding Point Entities|Добавление Entity точек|Your First Map|Ваша первая карта|Adding Light|Добавления света}}
 
{{ACategory|Hammer}}
{{ACategory|Level Design}}
 
 
{{stub}}

Latest revision as of 06:01, 12 July 2024

English (en)Français (fr)Magyar (hu)日本語 (ja)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)


Мы уже создавали браши(en). Существует и другой взгляд на браши: brush entity(en).

В этом примере, мы будем создавать браш, который действует в качестве выдвигающейся двери. Когда игрок коснется браша, он (браш) поднимется в воздух, а затем опустится снова.

Базовая func_door(en) энтити.

Конструкции

  1. Выберите Block tool Hammer block.png и создайте новый браш размерами 128x128x16.
    Tip.pngСовет:Если сетка Hammer'а слишком большая, чтобы сделать браш размером 16 юнитов, нажмите [ или кликните на Smaller Grid Hammer SmallerGrid.png, чтобы сделать ее меньше.
  2. Сделайте ваш браш entity объектом, используя Ctrl+T или кнопку toEntity

    Hammer toEntity button

  3. Это действие откроет диалог Object Properties(en):

    Object properties dialog

    Tip.pngСовет:Если вам необходимо вызвать диалог снова, после его закрытия, выберите ваш браш и нажмите Alt+Enter.
  4. Выберите func_door(en) из выпадающего меню "Class", которое находится наверху-слева, и нажмите "Apply".
  5. В нижней части основного "Keyvalues" списка, найдите "Move Direction". Измените значение на -90 0 0 или выберите "Up" из выпадающего меню, расположенного слева от черного круга.
  6. Нажмите "Apply" снова, затем закройте диалог Object Properties.

Теперь вы можете скомпилировать карту и проверить как работают двери.

Завершение

Откройте Texture Browser(en) и найдите "door", используя filter. Выберите материал который вам нравится, и примените его на браш. Кроме того, можно построить стену, которая соединяет дверь с краями вашей карты.

Но не стоит слишком увлекаться!


Неполная

This article or section is a stub. You can help by expanding it.