Zh/Creating Brush Entities: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
# 打开[[Hammer_Texture_Browser|Texture Browser]] 和 [[Hammer_Texture_Browser#Filter|filter]] for '''dev crate'''.  '''Dev/dev_measurecrate02''' 应当是一个 32x32 板条箱纹理.[[Image:Hammer_primitive_crate.png|thumb|left|Properly-sized cube with 32x32 texture.]]
# 打开[[Hammer_Texture_Browser|Texture Browser]] 和 [[Hammer_Texture_Browser#Filter|filter]] for '''dev crate'''.  '''Dev/dev_measurecrate02''' 应当是一个 32x32 板条箱纹理.[[Image:Hammer_primitive_crate.png|thumb|left|Properly-sized cube with 32x32 texture.]]
# 应用'''dev/dev_measurecrate02''' 纹理到你的立方体. {{Note|如果在你的二维视图中格网大于32个图形单位, 按下<code>[</code> 键或者点击 '''Smaller Grid''' 按钮 [[Image:Hammer_SmallerGrid.png]] 在格网上创建一个小的对象.}}
# 应用'''dev/dev_measurecrate02''' 纹理到你的立方体. {{Note|如果在你的二维视图中格网大于32个图形单位, 按下<code>[</code> 键或者点击 '''Smaller Grid''' 按钮 [[Image:Hammer_SmallerGrid.png]] 在格网上创建一个小的对象.}}
# 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''')]]
# 使用[[Hammer Selection Tool|Selection Tool]] [[Image:hammer_select.png|28px]] 调节你的立方体的尺寸直到纹理被正确匹配到立方体上. {{Note|从这一点来讲, 创建静态几何体和创建动态几何体是一样的.  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]].
# Select the crate using the [[Hammer Selection Tool|Selection Tool]].
# 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.
# 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.

Revision as of 23:27, 13 April 2008

在HAMMER编辑器里, Primitive(物件)是一个相当简单的笔刷对象. Primitives 物件可能是静态世界几何体或者可以被物理损坏的动态实体. 在这个例子里,我们创建一个可以受物理损害的动态物件:一个32个图形单位的箱子crate.


  1. 选择Block Tool Hammer block.png 并且在地图里创建一个立方体.
  2. 打开Texture Browserfilter for dev crate. Dev/dev_measurecrate02 应当是一个 32x32 板条箱纹理.
    Properly-sized cube with 32x32 texture.
  3. 应用dev/dev_measurecrate02 纹理到你的立方体.
    Note.png注意:如果在你的二维视图中格网大于32个图形单位, 按下[ 键或者点击 Smaller Grid 按钮 Hammer SmallerGrid.png 在格网上创建一个小的对象.
  4. 使用Selection Tool Hammer select.png 调节你的立方体的尺寸直到纹理被正确匹配到立方体上.
    Note.png注意:从这一点来讲, 创建静态几何体和创建动态几何体是一样的. 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.
  6. Click the toEntity button to tie a function to the primitive. This will bring up the Object Properties dialog box.
  7. Select func_breakable from the Class: drop-down menu.
  8. Under Keyvalues, select Name and name your crate something descriptive.
    func_breakable object properties
  9. Under Keyvalues, select Strength. The Strength value specifies how much damage the crate can take before breaking. Set the value to 1.
  10. 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.
  11. Under Keyvalues, select Physics Impact Damage Scale. This scales damage energy when the object is hit by a physics object.
    Note.png注意:A value of 0 means this feature is disabled. Set to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials.
  12. Click Apply and close the Object Properties dialog box.


Crate Texture

Once our crate is correctly sized, we can apply a proper texture to it using the same technique we used previously.

  1. Open the Texture Browser and filter for crate.
  2. 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.png注意:Ensure that the texture is aligned to Face.
Textured functional crate



Template:Otherlang:en Template:Otherlang:en:fr