12-Jul-2023
A brush entity, which receives damage from all normal damage sources, such as weapon fire, and can, eventually, break from it, spilling some debris/gibs in its place.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of func_breakable so other entities can trigger it to break it. Every trigger use-type works uniformly. Can be kill-targeted.
Target target : Entity to trigger when func_breakable breaks. Trigger use-type is 'Toggle'.
Delay Before Trigger delay : Delay before trigger entity specified in "Target".
Kill Target killtarget : Entity to remove when func_breakable breaks.
Global Entity Name globalname : Global name of entity, allows to have one entity in the multiple maps (e.g. elevator in map1 and map2 have the same "Global Entity Name" which tells the engine to treat those entities as a one single entity, so all elevator settings, positions, actions e.t.c. are copied to another map in a moment of map transitions.
Classification classify : Set the class of the spawned func_breakable. Think of how even though zombies and human grunts, by default, both are the players' enemies, yet have a dislike for and attack each other as well. This relation is created through the respective classes of the two entity types. For a complete table of how different classes react to each other, see monster class relation table.
Render FX renderfx : Set custom render FX effect. Only works when "Render Mode" is set to different than 'Normal'
Render Mode rendermode : Render mode determines how this entity is rendered.
FX Amount (1 - 255) renderamt : Render amount to use when other than "Render Mode" 'Normal' is used.
FX Color (R G B) rendercolor : Used with "Render Mode" 'Color' and 'Glow' to set color. Also sets color of 'Glow Shell' "Render Mode".
ZHLT Template Model Target zhlt_usemodel : For Brush entities: sets brush model template of this entity. Set it to the name of other brush entity (now called a template) and it's brush model will be used instead. Templates might save server resources by "copying" single brush entity (template identified by name) and using it in multiple places (can be used for entities like tables, columns, barrels, cars e.t.c.). Also one template occupies only one entity slot when compiling a map, no matter how many entities refers to it. For model-based point entities: copy display model of specified entity, to use it's model instead. Using "Custom model" is more appropriate in most cases, however, when it's not possible, use "ZHLT Copy Lighting From Target".
ZHLT Copy Lighting From Target zhlt_copylight : For Brush entities: copies light info from specified entity. This can be useful when we want this entity to be light up in a similar way the other entity of the map is, e.g. we have few func_pushables on map, and they are lit differently, tough they can be moved (and lightning is not updated on dynamic entities), it may looks shabby. With this keyvalue we can prevent this making all func_pushables received light in a same way. Another example: we have few windows in corridor (e.g. func_breakables), all of them receive a light in acceptable way, but the last window receive part of the light from another room and breaking whole atmosphere. We can set this window "Copy Lightning From Target" to any other window to fix this. Note that this can be also used for completely different entities, so we copy lightning from func_door to func_breakable as well. For model-based point entities: if model lightning does not satisfy you (e.g. it's too dark) you can specify a name of entity here to copy it's lightning values- it can be other model-based entity or simply info_target.
ZHLT Disable Clipping zhlt_noclip : Enable or disable collision of entity.
ZHLT Invisible zhlt_invisible : Brush entities only. Determines if entity should be visible.
ZHLT Custom Shadow (when opaque) zhlt_customshadow : Opaque brush entities only. If "ZHLT Ligth Flags" of this entity uses any of the option with 'Opaque' word, this will allow to customize shadow dropped by this entity. Value format: [0 - 1.0] [0 - 1.0] [0 - 1.0], use three values for color or only one for transparency.
ZHLT Embed Light Map (when translucent) zhlt_embedlightmap : Transparent brush entities only. Set it to 'Yes' and this transparent entity will take a light from environment making it looks much more natural. Use it when entities (e.g. glass represented by func_wall) omits lightning from surrounding. Note that this is expensive so shouldn't be used too often, but resolution of those lightmaps can be controlled by keyvalue explained below.
ZHLT Embed Light Map Resolution zhlt_embedlightmapresolution : Value of power of two that controls the resolution of embedded lightmaps of transparent textures (see keyvalue above). Higher value for better optimization. Default and recommended value is 4.
ZHLT Light Flags zhlt_lightflags : Brush entities only. Changes light casting or receiving setting.
ZHLT Light Origin Target light_origin : Set it to the name of info_target, this entity will receive lights from specified info_target position instead of it's own position. As a lot of entites can moves and lightning is not updated dynamically you can choose how your entity will be lit in game (e.g. elevators, pushables e.t.c.). Now you don't need to put the whole entity in the well-lit room at map start to make them look desirable.
Strength health : Set how many hit points the func_breakable has.
Material type material : Choose the material which matches what your func_breakable is supposed to be the most. The material type affects the func_breakable's sounds emitted when it takes damage, as well as which gibs are created when it is destroyed. If the material is set to 'Unbreakable glass', the func_breakable is, regardless of how funny that is, in fact, unbreakable.
Instant Break Weapon weapon : Allows you to specify an instant-break weapon other than the crowbar. Requires "Instant Break" flag selected.
Gibs' direction and velocity explosion : Set whether the gibs fly relative to where the attack came from, damage received and material (e.g. concrete gibs fly with less velocity) or randomly. This has no effect on the func_breakable destroyed via a trigger. Note: Blowing up stuff is much more fun when shit goes flying instead of just falling to the ground as if nothing happened.
Gib Model gibmodel : Custom model of broken entity parts. Models with multiple 'Submodels' uses all of sub-models for gibs. If "Material Type" is set to 'Glass' then spawned gibs are transparent.
Spawn On Break spawnobject : If the func_breakable is broken, the specified item will drop. It does respawn as standard item.
Explode Magnitude (0=none) explodemagnitude : If greater than zero, the func_breakable will cause an explosion at its position when it breaks. The greater the magnitude, the more damage the explosion will cause. Note that explosion damage values above 200 are know to cause explosion damage to even go through walls.
Sound Replacement File soundlist : Allows you to setup a sound replacement file for the func_breakable sounds. The path begins in 'svencoop/sound/mapname', whereas 'mapname' would be your map's name. You can go to the parent directory using '../'. A valid sound replacement file contains one or more lines with two sound-paths, which are separated by a space and wrapped into quotes. The first sound is the sound to be replaced. The second sound is the new sound. Sound-paths start in the sound directory. You cannot go to the parent directory using '../' in that case. These sounds do not need to be precached using a custom_precache point entity.
HUD Info name displayname : Name to display when player is looking at this func_breakable. Requires "Show HUD Info" flag selected
Minimum light level _minlight : Sets the minimum light level. Set this value if entity is too dark on compiled map. Also useful for things like computer screens or holograms. Default is 0, max 1.
1 : Only Trigger : If set, this func_breakable will only break when triggered, even if its health value is set to '1'.
2 : Touch : If set, this func_breakable will break as soon as a player touches it. If a delay before fire is set, the func_breakable will wait for that to run out before breaking after a touch.
4 : Pressure : If set, the func_breakable can be destroyed from pressure, as is e.g. inflicted by a func_train, regardless of the train's damage.
8 : Repairable : If set, this func_breakable can be repaired, as in, have its health restored, by a player 'attacking' it with weapon_pipewrenches' primary attack, for the amount of that weapon's primary damage value.
32 : Show HUD Info : If set, the func_breakable will show HUD info for players looking at it. This is not affected by CVar 'mp_allowmonsterinfo'.
64 : Immune To Clients : If set, the func_breakable will be immune to player attacks.
256 : Instant Break : If set, this func_breakable will break instantly if hit with a crowbar.
512 : Explosives Only : If set, this func_breakable can be damaged by explosives only.
2048 : Not in Deathmatch : Obsolete in Sven Co-op. Makes the entity don't appear in Multiplayer Games.