func_breakable

From Sven Co-op
Revision as of 16:43, 6 January 2023 by Tunac (talk | contribs) (Added info about instant break weapons)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
func_breakable
Type

brush

Status

supported

 


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.

1 Keyvalues

Classification : classify

Classification of this entity. If specified, enemies of this class will attack this entity.

Strength : health

Set how many hitpoints 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 to work.

  • Crowbar is the default option and will work with both the crowbar and electric crowbar. Will not work with a thrown crowbar.
  • Crowbar (Electric Only) requires the electric-mode of the crowbar. Will not work with a thrown crowbar.
  • Pipe Wrench

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 func_breakables 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.

Delay before fire : delay

Delay between the func_breakable breaking and it actually firing its target. If the 'Touch'-flag is set, the func_breakable will break in the same moment in which it fires its target.

Gib model : gibmodel

Custom model of broken entity parts. Models with multiple 'Submodels' uses all of sub-models for gibs.

Spawn on break : spawnobject

If the func_breakable is broken, the specified item will drop. It does not respawn after collected.

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_breakables 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.

Show HUD info : showhudinfo

If set to 'Yes', the HUD information (name, health etc.) are shown.

2 Flags

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 Client

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.

3 Changes

  • 5.0 Steam Release: Renamed 'Target on Break' keyvalue to 'Target' (removed from this subpage, it's not unique anymore).