Creating Brush Entities:ru

From Valve Developer Community
Revision as of 11:02, 26 May 2009 by 00000 (talk | contribs)
Jump to: navigation, search

Правильно масштабированный куб с размерами 32х32.

In Hammer, a 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 crate.

  1. Select the Block Tool Hammer block.png and create a cube in your map.
  2. Open the Texture Browser and filter for dev crate. Dev/dev_measurecrate02 should be a 32x32 crate texture.
  3. Apply the dev/dev_measurecrate02 texture to your cube.
    Note.png Note: If the grid on your 2D views is too large to get down to 32 units, press the [ key or click the Smaller Grid button Hammer SmallerGrid.png to create smaller objects on the grid.
  4. Resize your cube using the Selection Tool Hammer select.png until the texture fits properly on the cube.
    Note.png 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 toWorld or toEntity.
    toEntity button (Ctrl+T)
  5. Select the crate using the Selection Tool.
func_breakable object properties
  1. Click the toEntity button to tie a function to the primitive. This will bring up the Object Properties dialog box.
  2. Select func_breakable from the Class: drop-down menu.
  3. Under Keyvalues, select Name and name your crate something descriptive.
  4. Under Keyvalues, select Strength. The Strength value specifies how much damage the crate can take before breaking. Set the value to 1.
  5. 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.
  6. Under Keyvalues, select Physics Impact Damage Scale. This scales damage energy when the object is hit by a physics object.
    Note.png 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.
  7. Нажмите кнопку Apply, чтобы подтвердить изменения и закрыть текущее окно.

Текстуры ящика

Готовый затекстурированный ящик

Как только нашему ящику задали правильные размеры, тем же способом применим к нему подходящую текстуру.

  1. Откройте Texture Browser(браузер текстур) и введите в поле filter(Фильтр) слово crate(ящик).
  2. Выберите текстуру props/woodcrate001a и примените её к нашему кубу. Также можно подогнать размеры текстуры с помощью окна Face Edit Sheet(Вызывается с помощью Shift+A или выбором инструмента Toggle Texture Application).
Note.png Примечание: Убедитесь, что текстуры выравниваются по граням куба (параметр align равен Face.)

External Links

Template:Otherlang:ru Template:Otherlang:ru:en, Template:Otherlang:ru:fr, Template:Otherlang:ru:zh-cn