The func_breakable entity allows you to create a breakable brush.
Attributes
Name (targetname) - Property used to identify entities.
Material Type (material) - The type of material that a func_breakable or func_pushable should act as. Options are:
0 = Glass
1 = Wood
2 = Metal
3 = Flesh
4 = Cinder Block
5 = Ceiling Tile
6 = Computer
7 = Unbreakable Glass
8 = Rocks
Spawn on Break (spawnobject) - Used by func_breakable and func_pushable. Determines what item is spawned when the entity is broken. Options are:
0 = Nothing
1 = Battery
2 = Health Kit
3 = 9mm Handgun
4 = 9mm Clip
5 = Machine Gun
6 = Machine Gun Clip
7 = Machine Gun Grenades
8 = Shotgun
9 = Shotgun Shells
10 = Crossbow
11 = Crossbow Bolts
12 = 357
13 = 357 Clip
14 = RPG
15 = RPG Clip
16 = Gauss Clip
17 = Hand Grenade
18 = Tripmine
19 = Satchel Charge
20 = Snark
21 = Hornet Gun
Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
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 and Fade)
Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
0 = Normal
1 = Color
2 = Texture
3 = Glow
4 = Solid
5 = Additive
Global Entity Name (globalname)
Target on Break (target) - When the func_breakable is activated (i.e. broken), it will activate this entity.
Strength (health) - The amount of damage the entity will take before breaking.
Gibs Direction (explosion) - Direction the gibs will go on break (0 = Random, 1 = Relative to Attack)
Delay before fire (delay) - Delay before Target on Break is triggered after being broken.
Gib Model (gibmodel) - Model to use for gibs (overrides default specified by Material Type).
Explode Magnitude (explodemagnitude) - This will determine the size of the explosion that occurs when the brush breaks. 0 = None.
FX Amount (renderamt)
FX Color (rendercolor)
Light Origin Target (light_origin)
Minimum light level (_minlight)
ZHLT Lightflags (zhlt_lightflags)
Flags
Only Trigger (1) - Entity can only be activated (broken) by being triggered. Bug: even with this flag the func_breakable still can get damage from some attacks (e.g. melee attacks of some npcs). Make sure your func_breakable has enough health to sustain the damage.
Touch (2) - Brush will break on touch.
Pressure (4) - Brush will break when pressured (e.g. player walking on it).
Instant crowbar (256) - Whack it with a crowbar and it will break instantly (regardless of strength).
Notes
Deathmatch only: Items spawned by this entity will keep respawning eventually after pick up.
Team Fortress Classic only
Attributes
Targetname of teamcheck goal (teamcheck) - Using this in conjunction with an info_tf_teamcheck allows you to switch the entity's team allegiance when the info_tf_teamcheck changes its team setting. The team_no property must be set to Any (0) if you use this value.
Has item # (items_allowed) - The player must be carrying this item to use this entity. Set 0 to ignore this criterion.
Has item from group # (h_i_g) - The player must be carrying any item from this group to use this entity. Set 0 to ignore this criterion.
If goal # active (if_goal_is_active) - Players can only use the entity if this goal is in the active state. Set 0 to ignore this criterion.
If goal # inactive (if_goal_is_inactive) - Players can only use the entity if this goal is in the inactive state. Set 0 to ignore this criterion.
If goal # removed (if_goal_is_removed) - Players can only use the entity if this goal is in the removed state. Set 0 to ignore this criterion.
If group # active (if_group_is_active) - A player can only use the entity if all the goals in this group are in the active state. Set 0 to ignore this criterion.
If group # inactive (if_group_is_inactive) - A player can only use the entity if all the goals in this group are in the inactive state. Set 0 to ignore this criterion.
If group # removed (if_group_is_removed) - A player can only use the entity if all the goals in this group are in the removed state. Set 0 to ignore this criterion.
Team allowed to activate entity (team_no) - The team you specify here will be able to use this entity Values are:
Any (0)
Blue (1)
Red (2)
Yellow (3)
Green
Playerclass allowed to activate (playerclass) - You can limit the use of this entity to specific playerclasses. Values are:
Any (0)
Scout (1)
Sniper (2)
Soldier (3)
Demoman (4)
Medic (5)
HWGuy (6)
Pyro (7)
Spy (8)
Engineer (9)
Hasnt Item from group # (hasnt_item_from_group) - The player must not be carrying any item from this group to use this entity. Setting this to 0 will allow any player to use the entity if he meets the other criteria.
If item has moved # (if_item_has_moved) - This item must not be in its original spawn location for any player to use this entity. Setting this to 0 will always allow players to use the entity if they meet the other criteria.
If item hasnt moved # (if_item_hasnt_moved) - This item must be in its original spawn location for any player to use this entity. Setting this to 0 will always allow players to use the entity if they meet the other criteria.
cs 1.6:
-func_breakable with any material can be broken by grenade touch
-this works with or without targetname of it
-rendermode has to be something other than "normal" rendermode for this to work, if you wanted "normal", you can just use "solid" instead
this means that env_render can toggle its feature to be broken or not (tested)
^ based on my env_render testing render modes other than normal and solid creates glass bullet decals when shot, so in that sense the engine assumes a brush entity in those modes as being made of glass. the grenade code must be using the same logic as well, so that checks out.
-func_breakable with any material can be broken by grenade touch
-this works with or without targetname of it
-rendermode has to be something other than "normal" rendermode for this to work, if you wanted "normal", you can just use "solid" instead
this means that env_render can toggle its feature to be broken or not (tested)