func_breakable

A func_breakable breaks into pieces when it takes enough damage or when you trigger it, with the sound and the gibs
of its material. It can drop an object, explode, and fire its Target when it breaks.
Attributes
The entity also has these common keys:
- Naming and triggering: Name, Target, KillTarget and Global Entity Name
- Appearance: all except Model scale, Body and Skin
- Compiler keys of brush entities: all of them
delaySets how many seconds pass after it breaks before it fires its Target. With the flag Pressure, it is also how long it holds after a player steps on it, at least 0.1 seconds.
0healthSets how much damage it takes before it breaks. Melee hits deal double damage to it. On a func_pushable, it only matters with the flag Breakable.
If you leave this key empty or set 0, the first hit breaks it.
1materialSets what it is made of. This sets the sounds when it is hit and when it breaks, the gibs it breaks into and the marks that hits leave.The 9 choices
Glass (0)explosionSets which way the gibs fly when it breaks.
- Random (0) - In random directions
- Relative to Attack (1) - Away from the hit that broke it
Random (0)gibmodelSets a model for the broken pieces, used instead of the normal gibs of its Material type.
spawnobjectSets an object that appears where it breaks. You can also type the class name of an item, a weapon or ammo that starts with item_, weapon_ or ammo_, such as weapon_k444 or item_battery. With any other class name, such as a monster's, nothing appears. With developer 1 set in the console, the console then shows an error when the map starts. You can't change this key while the map runs.
- Nothing (0) - Nothing appears
- Battery (1) - A battery
- RPG (14) - A Nuclear RPG
- RPG Clip (15) - RPG ammo
- Hand grenade (17) - A hand grenade
- Tripmine (18) - A mine
- Satchel Charge (19) - A satchel charge
- Pitbull (20) - Pitbulls
Nothing (0)explodemagnitudeMakes it explode when it breaks, with this much damage and a fireball to match. The blast reaches 2.5 times this value in units, and 0 means no explosion.
0Sets how many gibs it breaks into, up to 255. With 0, the game decides, and with -1, it breaks into no gibs.
0Sets the size of the gibs, so 0.5 is half and 2 is double.
If you leave this key empty or set 0, the gibs have their normal size.
The entity fires this at each hit, and passes on a point at the spot of the hit as the activator. That point moves in the direction of the hit, so a locus vector key can read the direction.
Sets the activator that the Target gets when it breaks.
- No (Default) (0) - No activator
- This breakable (1) - The breakable itself
- My attacker or activator (2) - The player or monster that broke it
No (Default) (0)Sets whether it throws sparks when it is hit.
- Default (only computer material) (0) - Only the Computer material throws sparks
- Yes (1) - It sometimes throws sparks and plays a spark sound when a shot, a melee attack or a beam hits it
Default (only computer material) (0)Sets whether its look changes when it is damaged.
- No (0) - It keeps its texture
- Switch to alternate texture (1) - It shows its alternate texture, the
+aframe, once it has half of its Strength or less
No (0)Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.
If you leave this key empty, the entity doesn't move with anything.
parentflagsKeeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.
0Flags
1Only TriggerOnly a trigger breaks it, and no damage lowers its health, not even a monster's melee attack
2TouchA player who runs into it breaks it when their speed divided by 100 is at least its Strength, and the player takes a quarter of that as damage
4PressureIt breaks when a player stands on it, after its Delay before fire
With Trigger when hit, the entity reverses the horizontal part of the hit direction that it passes on, so the direction points back toward the shooter
256Instant CrowbarA player's melee hit breaks it at once, even when its Strength is high. This flag is set by default
512Explosives OnlyOnly explosions hurt it, so bullets and melee hits do nothing
Notes
- If Gibs Direction is "Relative to Attack", the gibs fly away from the attacker when damage breaks it. With "Random", they fly in random directions
- Unbreakable Glass never breaks, not even when you trigger it
See also
func_breakable_effect- plays the break of a breakable, with nothing to breakfunc_pushable- a brush players can push, which can also be breakable- func_breakable on TWHL - the Half-Life entity
Changes since 1.38
- You can use the new keys Custom number of gibs, Custom gib scale, Trigger when hit, Target's Activator, Spark When Hit and Switch Texture When Damaged, and the new flags Invert Hit Vector, Explosives Only, Not solid, Smoke trails on gibs and Transparent gibs
- A breakable with Only Trigger keeps its health when a monster hits it in melee. In SBO 1.38, these hits lowered its health and could break it
- With Gibs Direction "Relative to Attack", the gibs fly away from the attacker. In SBO 1.38, they flew toward the attacker
- New in SBO 2.1.0: Spawn On Break also takes a class name

