Creating Primitives:zh-cn
From Valve Developer Community
| Your First Map |
|---|
| 1. Getting Started |
| 2. View Navigation |
| 3. Basic Construction |
| 4. Creating a Room |
| 5. Applying Textures |
| 6. Adding Entities |
| 7. Adding Light |
| 8. Adding Prop Models |
| 9. Saving and Compiling |
在HAMMER编辑器里, Primitive(物件)是一个相当简单的笔刷对象. Primitives 物件可能是静态世界几何体或者可以被物理损坏的动态实体. 在这个例子里,我们创建一个可以受物理损害的动态物件:一个32个图形单位的箱子crate (http://www.oldmanmurray.com/features/39.html).
- 选择Block Tool
并且在地图里创建一个立方体.
- 打开Texture Browser 和 filter for dev crate. Dev/dev_measurecrate02 应当是一个 32x32 板条箱纹理.
- 应用dev/dev_measurecrate02 纹理到你的立方体.
- 使用Selection Tool
调节你的立方体的尺寸直到纹理被正确匹配到立方体上.
- 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.
- Click Apply and close the Object Properties dialog box.
[edit]
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.
| ← Back to Creating a Room | Return to Your First Map | Continue to Adding Entities → |
This page is also available in: French (français)




