Zh/Creating Brush Entities: Difference between revisions
< Zh
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
<br style="clear:both"> | <br style="clear:both"> | ||
# | # 选择[[Hammer Block Tool|Block Tool]] [[Image:hammer_block.png|28px]] 并且在地图里创建一个立方体. | ||
# 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.[[Image:Hammer_primitive_crate.png|thumb|left|Properly-sized cube with 32x32 texture.]] | # 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.[[Image:Hammer_primitive_crate.png|thumb|left|Properly-sized cube with 32x32 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.}} | # 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.}} |
Revision as of 21:11, 13 April 2008
在HAMMER编辑器里, Primitive(物件)是一个相当简单的笔刷对象. Primitives 物件可能是静态世界几何体或者可以被物理损坏的动态实体. 在这个例子里,我们创建一个可以受物理损害的动态物件:一个32个图形单位的箱子crate.
- 选择Block Tool
并且在地图里创建一个立方体.
- Open the Texture Browser and filter for dev crate. Dev/dev_measurecrate02 should be a 32x32 crate texture.
- Apply the dev/dev_measurecrate02 texture to your cube.
- Resize your cube using the Selection Tool
until the texture fits properly on the cube.
- Select the crate using the Selection Tool.
- Click the toEntity button to tie a function to the primitive. This will bring up the Object Properties dialog box.
- Select 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.
注意: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.
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 Texture Browser and 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.
注意:Ensure that the texture is aligned to Face.