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 1: Line 1:
__NOTOC__{{first room menu:zh-cn}}
__NOTOC__{{first room menu}}
在HAMMER编辑器里, [[Primitives|Primitive]](物件)是一个相当简单的笔刷对象.  Primitives 物件可能是静态世界几何体或者可以被物理损坏的动态实体. 在这个例子里,我们创建一个可以受物理损害的动态物件:一个32个图形单位的箱子[http://www.oldmanmurray.com/features/39.html crate].
在Hammer中,[[Primitives|地图元素]]在通常情况下就是一只简单的比刷对象。地图元素可以是地图中用于物理运动或产生伤害的几何与可互动实体。在此例子中,我们将会创建一种交互式元素,用于地图中的物理碰撞和产生伤害:一只32单位的[http://www.oldmanmurray.com/features/39.html 板条箱]


<br style="clear:both">
<br style="clear:both">
# 选择[[Hammer Block Tool|Block Tool]] [[Image:hammer_block.png|28px]] 并且在地图里创建一个立方体.
# 选择[[Hammer Block Tool|固体工具]][[Image:hammer_block.png|28px]]并在你的地图中创建一只立方体。
# 打开[[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|纹理浏览器]][[Hammer_Texture_Browser#Filter|过滤]]'''dev crate''' '''Dev/dev_measurecrate02''' 应该是一只 32x32 的板条箱纹理。[[Image:Hammer_primitive_crate.png|thumb|left|大小正好的立方体与32x32的纹理。]]
# 应用'''dev/dev_measurecrate02''' 纹理到你的立方体. {{Note|如果在你的二维视图中格网大于32个图形单位, 按下<code>[</code> 键或者点击 '''Smaller Grid''' 按钮 [[Image:Hammer_SmallerGrid.png]] 在格网上创建一个小的对象.}}
# 给你的立方体应用'''dev/dev_measurecrate02'''纹理。 {{Note|如果二维视图的网格大于32单位,可以按下 <code>[</code> 键或者点击'''缩小网格'''按钮[[Image:Hammer_SmallerGrid.png]]以便在网格上创建更小的对象。}}
# 使用[[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''')]]
# [[Hammer Selection Tool|选取工具]][[Image:hammer_select.png|28px]]调整你的立方体大小,直到纹理与立方体吻合。 {{Note|在这一点上,创建环境几何体元素与创建互动元素是相同的。为了更好地指定箱子的作用,是环境几何提还是一种互动对象,我们必须选取并将其转至[[Hammer_New_Objects_Toolbar#toWorld_.3CCtrl.2BShift.2BW.3E|环境]][[Hammer_New_Objects_Toolbar#toEntity_.3CCtrl.2BT.3E|实体]]}}中的一种。[[Image:hammer_toEntityButton.png|right|thumb|150px|'''转为实体''' 按钮 ('''Ctrl+T''')]]
# Select the crate using the [[Hammer Selection Tool|Selection Tool]].
# [[Hammer 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.
# 点击[[Hammer_New_Objects_Toolbar#toEntity_.3CCtrl.2BT.3E|转为实体]]按钮将一样[[List_of_entities#Function_.28brush.29_entities|功能]]绑定到此元素。这会打开[[Hammer_Object_Properties_Dialog|对象属性]]对话框。
# Select [[Func_breakable|func_breakable]] from the '''Class:''' drop-down menu.
# 从'''类别:'''下拉菜单中选择[[Func_breakable|func_breakable]]
# Under '''Keyvalues''', select '''Name''' and name your crate something descriptive. [[Image:Hammer_object_properties.png|right|thumb|300px|func_breakable object properties]]
# '''Keyvalues'''下,选择'''名称'''(Name)并给你的箱子起个有意义的名称。[[Image:Hammer_object_properties.png|right|thumb|300px|func_breakable的对象属性]]
# Under '''Keyvalues''', select '''Strength'''. The Strength value specifies how much damage the crate can take before breaking. Set the value to '''1'''.
# '''Keyvalues'''下,选择'''耐久'''(Strength)。此耐久值指定了箱子在被破坏钱可承受多少伤害。设置该值为'''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.
# '''Keyvalues'''下,选择'''材料类型'''(Material Type)。此材料类型指定了箱子会发出何种声音和掉出何种碎片。在下拉菜单中选择'''木头'''(Wood)。
# 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.}}
# 在'''Keyvalues'''下,选择'''物理撞击伤害比例'''(Physics Impact Damage Scale)。这指定当对象被物理对象击中时造成伤害的比例。{{Note|当值为'''0'''时表示此特性不起作用。设置为1.0则材料拥有肉体强度,数字越小代表材料越坚固。}}
# Click '''Apply''' and close the Object Properties dialog box.
# 点击'''应用'''并关闭对象属性对话框。
<br style="clear:both">
<br style="clear:both">


==Crate Texture==
==板条箱纹理==
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'''.
# 打开[[Hammer_Texture_Browser|纹理浏览器]][[Hammer_Texture_Browser#Filter|过滤]]'''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'''.}}
# 选择'''props/woodcrate001a'''并应用给你的立方体。你可能会用到表面编辑选项卡使纹理与立方体吻合。{{Note|请确保纹理是与'''Face'''对齐的。}}
[[Image:Hammer_primitive_crate2.png|thumb|315px|left|Textured functional crate]]
[[Image:Hammer_primitive_crate2.png|thumb|315px|left|功能性的板条箱贴上纹理后]]


<br style="clear:both">
<br style="clear:both">
{{NavBar|Creating a Room:zh-cn|Your First Map:zh-cn|Adding Entities:zh-cn}}
{{NavBar|Creating a Room:zh-cn|Your First Map:zh-cn|Adding Entities:zh-cn}}
[[Category:Chinese]]


{{otherlang:zh-cn}}
{{otherlang:zh-cn}}
{{otherlang:zh-cn:en|Applying Textures}}
{{otherlang:zh-cn:en|Creating Primitives}}
{{otherlang:zh-cn:fr|Applying Textures:fr}}


[[Category:Level Design Tutorials]]
[[Category:Level Design Tutorials]]

Revision as of 02:46, 14 October 2008

在Hammer中,地图元素在通常情况下就是一只简单的比刷对象。地图元素可以是地图中用于物理运动或产生伤害的几何与可互动实体。在此例子中,我们将会创建一种交互式元素,用于地图中的物理碰撞和产生伤害:一只32单位的板条箱


  1. 选择固体工具Hammer block.png并在你的地图中创建一只立方体。
  2. 打开纹理浏览器过滤dev crateDev/dev_measurecrate02 应该是一只 32x32 的板条箱纹理。
    大小正好的立方体与32x32的纹理。
  3. 给你的立方体应用dev/dev_measurecrate02纹理。
    Note.png注意:如果二维视图的网格大于32单位,可以按下 [ 键或者点击缩小网格按钮Hammer SmallerGrid.png以便在网格上创建更小的对象。
  4. 选取工具Hammer select.png调整你的立方体大小,直到纹理与立方体吻合。
    Note.png注意:在这一点上,创建环境几何体元素与创建互动元素是相同的。为了更好地指定箱子的作用,是环境几何提还是一种互动对象,我们必须选取并将其转至环境实体
    中的一种。
    转为实体 按钮 (Ctrl+T)
  5. 选取工具选择板条箱。
  6. 点击转为实体按钮将一样功能绑定到此元素。这会打开对象属性对话框。
  7. 类别:下拉菜单中选择func_breakable
  8. Keyvalues下,选择名称(Name)并给你的箱子起个有意义的名称。
    func_breakable的对象属性
  9. Keyvalues下,选择耐久(Strength)。此耐久值指定了箱子在被破坏钱可承受多少伤害。设置该值为1
  10. Keyvalues下,选择材料类型(Material Type)。此材料类型指定了箱子会发出何种声音和掉出何种碎片。在下拉菜单中选择木头(Wood)。
  11. Keyvalues下,选择物理撞击伤害比例(Physics Impact Damage Scale)。这指定当对象被物理对象击中时造成伤害的比例。
    Note.png注意:当值为0时表示此特性不起作用。设置为1.0则材料拥有肉体强度,数字越小代表材料越坚固。
  12. 点击应用并关闭对象属性对话框。


板条箱纹理

当我们的板条箱具有适当的大小时我们就能用以前用过的技术给它应用合适的纹理。

  1. 打开纹理浏览器过滤crate
  2. 选择props/woodcrate001a并应用给你的立方体。你可能会用到表面编辑选项卡使纹理与立方体吻合。
    Note.png注意:请确保纹理是与Face对齐的。
功能性的板条箱贴上纹理后



Template:Otherlang:zh-cn Template:Otherlang:zh-cn:en