这篇条目有关 "金源" 引擎。如需详情,点击这里。

Zh/Func breakable (GoldSrc): Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{LanguageBar}} {{tabs|func_breakable|goldsrc=1|source=1|main=source}} {{CD|CBreakable|goldsrc=1}} {{this is a|brush entity|name=func_breakable|engine=GoldSrc}} 当受到指定数值的伤害时,它将被摧毁。 也可通过将"强度"键值设为0来设置永不被破坏。 == 键值 == {{Hl1 kv targetname}} {{Hl1 kv global}} {{minititle|可破坏}} {{KV|破坏时触发的目标|intn=target|target_destination|当此实体破坏时,要触发的实体的targetna...")
 
No edit summary
Tag: Manual revert
 
(2 intermediate revisions by the same user not shown)

Latest revision as of 07:51, 19 October 2025

English (en)中文 (zh)Translate (Translate)
C++ 类层级
CBreakable
CBaseDelay
CBaseEntity
C++ func_break.cpp

func_breakable是一个固体实体(en),可在所有的 金源 金源 游戏中使用。 当受到指定数值的伤害时,它将被摧毁。 也可通过将"强度"键值设为0来设置永不被破坏。

键值

Name (targetname) <target_source>
The targetname that other entities refer to this entity by.
Global Entity Name (globalname) <字符串(en)>
Name to identify entity accross level transitions. Entities with the same global name will have the same status accross maps.

可破坏:

破坏时触发的目标 (target) <target_destination>
当此实体破坏时,要触发的实体的targetname
Warning.png警告:触发者为空,而不是玩家去破坏可破坏物,如果 game_player_equip 成为目标,游戏就会崩溃
强度 (health) <整数(en)>
破坏前能够承受的损伤量.
材质类型 (material) <integer choices(en)>
用于声音和碎块的材质.
标准选项
  • 0: "玻璃"
  • 1: "木头"
  • 2: "铁块"
  • 3: "肉块"
  • 4: "砖块"
  • 5: "天花板瓷砖"
  • 6: "计算机"
  • 7: "防弹玻璃"
  • 8: "石头"
零点行动 关卡模式 零点行动 关卡模式 choices
  • 0: "玻璃"
  • 1: "木头"
  • 2: "块"
  • 3: "块"
  • 4: "砖块"
  • 5: "瓷砖"
  • 6: "计算机"
  • 7: "防弹玻璃"
  • 8: "石头"
  • 9: "无"
  • 10: "酒瓶"
  • 11: "上个材质" [澄清]
碎块方向 (explosion) <choices>
碎块应朝随机方向飞溅,还是相对于击碎该实体的攻击方向飞溅.
  • 0: "随机"
  • 1: "相对于攻击方向"
Note.png注意:In 零点行动 关卡模式, direction is used instead of 1.
触发延迟 (delay) <整数(en)>
在击破后,以秒为单位,在触发"破坏时触发的目标"实体之前所花费的时间.
碎块模型 (gibmodel) <模型文件路径(en)>
用于替代默认材质碎块的模型,仅在物品被破坏时生成,相对于模组文件夹.
PlacementTip.gif放置提示:此功能可用于不可破坏的func_breakables对象,用于显示来自外部BSP文件的任意bmodel模型,并保持正确的碰撞检测. 确保gibmodel键值对在model键值对之前列出。
可能需要使用MESS MESS重命名类名,以防止实体在J.A.C.K. J.A.C.K.中显示在错误位置——这是由于处理无刷涂的@SolidClass实体时存在漏洞所致.
破坏时生成 (spawnobject) <choices>
被破坏时会生成的物品.
Note.png注意:零点行动 关卡模式 零点行动 关卡模式, 这其实是一条字符串,能够生成大多数以ammo_item_weapon_开头的实体.
爆炸强度 (0=无) (explodemagnitude) <整数(en)>
破碎时爆炸强度。若为0则不会爆炸.


Render FX (renderfx) <choices>
Render FX mode to use, for special effects.
Value Description
0 Normal
1 Slow Pulse
2 Fast Pulse
3 Slow Wide Pulse
4 Fast Wide Pulse
5 Slow Fade Away
6 Fast Fade Away
7 Slow Become Solid
8 Fast Become Solid
9 Slow Strobe
10 Fast Strobe
11 Faster Strobe
12 Slow Flicker
13 Fast Flicker
14 Constant Glow
15 Distort
16 Hologram (Distort + fade)
Render Mode (rendermode) <choices>
Render Mode to use.
Value Description
0 Normal
1 Color
2 Texture
3 Glow
4 Solid
5 Additive
Render Amount (0-255) (renderamt) <整数(en)>
Controls transparency when using another render mode then normal. 0 is completely invisible, and 255 is opaque. If render mode is solid, then all values except 0 are opaque.
Render Color (R G B) (rendercolor) <color255(en)>
Color to use by the specified render mode.
Also used on brush entities to control the speed of scrolling textures; see func_conveyor for more information.


Minimum light level (_minlight) <normal(en)>
ZHLT family
ZHLT Light Flags (ZHLT 2.2+) (zhlt_lightflags) <flags(en)>
Special lighting behavior. Only available if using Zoner's Half-Life Compile Tools or a fork thereof.
Embedded Fix : [1]
Opaque (blocks light) : [2]
Concave fix : [4]
Note.png注意:Most FGDs will have this as "choices" with options for values of 0/1/2/3/6, because Hammer and Jack do not support the "flags" KV type outside of Spawnflags.
Light Origin Target (ZHLT 2.2+) (light_origin) <target_destination>
During lighting compilation, this entity will be treated as if its origin were at the target entity's origin. Requires an origin brush.
Entity to Use Model From (ZHLT) (zhlt_usemodel) <target_destination>
Used to set the model to a different entity's model (bmodel, BSP, MDL, or SPR). The targeted entity will be moved before this entity to ensure proper loading. Requires an origin brush on this entity, as well as on the target entity if target entity is a brush entity.
Nonsolid (ZHLT) (zhlt_noclip) <布尔值(en)>
Disables generation of clipnodes for all brushes on this entity, except for clip brushes. The entity may still be solid to point traces (hitscans, grenades, etc) if the brush contents are set to solid.
Tip.png提示:Always enable this for cosmetic func_illusionary, (not if, for example, skin is set to -16 to make it a ladder); VHLT does not strip clipnodes for this entity.


Don't Render (ZHLT 3+) (zhlt_invisible) <布尔值(en)>
Treat all faces as if they were textured with NULL.
Tip.png提示:Use this on triggers which use custom textures instead of AAATRIGGER or NULL, such as ladders.
Custom Hull 1 (VHLT+) (zhlt_hull1) <target_destination>
Custom Hull 2 (VHLT+) (zhlt_hull2) <target_destination>
Custom Hull 3 (VHLT+) (zhlt_hull3) <target_destination>
Which named info_hullshape entity to use for the specified clipping hull.
Mins/Maxs (VHLT+) (zhlt_minsmaxs) <mins vector + maxs vector(en)>
Override this entity's bounding box.
zhlt_transform (zhlt_transform) <???(en)>
Never visible (VHLT+) (zhlt_hidden) <布尔值(en)>
Don't create marksurfaces for this entity, resulting in it being treated by VIS as never visible.
Tip.png提示:The _HIDDEN texture suffix does the same thing, but also works on world brushes, which are used for model lighting.
Strip lightmaps after compiling (VHLT+) (zhlt_striprad) <布尔值(en)>
Undefines the lightmaps for brushes on this entity after compiling, resulting in the faces being fullbright and not using up allocblock. Unlike TEX_SPECIAL, faces with zhlt_striprad will still affect bounced lighting.


Custom Shadow Color (VHLT+) (zhlt_customshadow) <color1(en)>
If this entity casts shadows, the shadows will be this color instead of black. Can also be a single value, for monochrome.
Fake Lightmap (VHLT v33+) (zhlt_embedlightmap) <布尔值(en)>
Generates unique diffuse textures for all textured faces, then bakes lighting information directly into the generated textures. Primarily used to prevent translucent surfaces from "glowing", as rendermodes which support translucency don't render lightmaps on the vanilla renderer. Implies zhlt_striprad.
Icon-Important.png重要:The resulting textures will be renamed to have the prefix __rad; as such, any unique attributes will be lost.
Downscale Fake Lightmap (VHLT v34+) (zhlt_embedlightmapresolution) <整数(en)>
Downscale texture created by zhlt_embedlightmap this many times.
ericw-tools
Note.png注意:If any of the booleans are set in worldspawn, they can be disabled per entity by being set to -1.
Cast shadows (_shadow) <布尔值(en)>
Cast shadows from this entity. Implies _shadowself.
Self-shadowed (_shadowself) <布尔值(en)>
Cast shadows from this entity onto itself.
Shadow world only (_shadowworldonly) <布尔值(en)>
Only cast shadows on world, not models.
Smooth shading (_phong) <布尔值(en)>
Enable smooth shading between faces which are less than _phong_angle.
Autosmoothing angle (_phong_angle) <整数(en)>
Angle to smooth; default 89. Set to 44 to match QRAD/HLRAD defaults.
Maximum light level (_maxlight) <normal(en)>
Minlight color (_mincolor, _minlight_color) <color1(en)>
Color of _minlight. Also accepts color255, provided at least one value is greater than 1.
Minlight only (_lightignore) <布尔值(en)>
Only receive lighting from _minlight
Disable backface culling (_mirrorinside) <布尔值(en)>

标记

仅触发 : [1]
触碰 : [2]
挤压 : [4]
撬棍触发 : [256]