CBreakableProp
Jump to navigation
Jump to search
Code classes:
CBreakablePropCBaseProp(props)CBaseAnimating(models)CBaseEntity(all ents)
CBreakableProp is a code class inherited by breakable prop entities. When a breakable is broken, it will usually spawn "gibs" - small objects representing the broken pieces. Gibs are most commonly spawned with the gib entity. To do: Describe the conditions needed for a model to be breakable, and how health is set.
ConVars/Commands[edit | edit source]
| ConVar/Command | Parameters or default value | Parameter Type | Effect |
|---|---|---|---|
breakable_disable_gib_limit | 0 | 0 disables, 1 enables | To do: Effects cannot be observed without at least two people on a multiplayer server. |
breakable_multiplayer | 1 | 0 disables, 1 enables | To do: Effects cannot be observed without at least two people on a multiplayer server. |
prop_active_gib_limit | 999999 | Arbitrary number | Number of gibs that may be present at once. |
prop_active_gib_max_fade_time | 999999 | Seconds | Gibs will be forced to fade away after being present for this long, if not already fading for any other reason. |
Flags[edit | edit source]
- 16: Break on Touch
- 32: Break on Pressure (breaks whenever put under any pressure e.g. being stood on)
Keyvalues[edit | edit source]
- Health
(health)<integer> - How close the prop is to breaking. The entity classname has to be
prop_physics_overrideorprop_dynamic_overrideto use, otherwise the health is defined through the model's QC file. - Explosion Damage
(ExplodeDamage)<float> - If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also Explosion Radius.
- Explosion Radius
(ExplodeRadius)<float> - If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also Explosion Damage.
- Min Damage to Hurt
(minhealthdmg)<integer> - If a single hit to the object doesn't do at least this much damage, the prop won't take any of the damage from that hit.
- Performance Mode
(PerformanceMode)<choices> - Used to limit the amount of gibs produced when this entity breaks, for performance reasons.
- 0: Normal
- 1: No Gibs
- 2:
Full Gibs on All Platforms (including Xbox 360, PS3, etc)- Useless for community mappers. - 3: Reduced gibs
- Break Model Message
(BreakModelMessage)<string>(only available in



) - "If set, will use this break model message instead of the normal break behavior." To do: More info...
- Sound to make when punted
(puntsound)<sound> - Sound to make when punted by gravity gun.
- Pressure Delay
(PressureDelay)<float> - Seconds to delay breaking from pressure if Break on Pressure is checked. Allows creaking/groaning sounds to play.
- Physics Impact Damage Scale
(physdamagescale)<float> - Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
Inputs[edit | edit source]
- physdamagescale
<float> - Sets Physics Impact Damage Scale.
- EnablePhyscannonPickup

- Makes the prop able to picked up by the gravity gun.
- DisablePhyscannonPickup

- Makes the prop not able to picked up by the gravity gun.
- EnablePuntSound

- Allow this prop to play the Sound to make when punted.
- DisablePuntSound

- Do not allow this prop to play the Sound to make when punted.
- Break
- Breaks the prop.
- SetHealth
<integer> - Sets a new value for the prop's health. If the prop's health reaches zero it will break. Works even if not using an
_overrideentity. - AddHealth
<integer> - Adds health to the prop.
- RemoveHealth
<integer> - Removes health from the prop.
Outputs[edit | edit source]
- OnPhysCannonAnimatePreStarted

- Fired when prop starts its
ACT_PHYSCANNON_ANIMATE_PREactivity. Caused by the object being picked up by the gravity gun. - OnPhysCannonAnimatePullStarted

- Fired when prop has started its
ACT_PHYSCANNON_ANIMATEactivity.ACT_PHYSCANNON_ANIMATE_PREplays once, thenACT_PHYSCANNON_ANIMATEstarts looping. - OnPhysCannonDetach

- Fired when prop has started its
ACT_PHYSCANNON_DETACHactivity (caused by the gravity gun ripping it from a wall). - OnPhysCannonAnimatePostStarted

- Fired when prop has started its
ACT_PHYSCANNON_ANIMATE_POSTactivity (caused by the player letting the prop go from the gravity gun). - OnPhysCannonPullAnimFinished

- Fired when prop has finished all gravity gun-related animations.
- OnBreak
- Fired when this object breaks. Activator is whatever breaks the object.
- OnHealthChanged
<float> - Fired whenever the health of the prop has increased or decreased. Automatically puts the new health amount as a decimal percent (e.g. 45% = 0.45) as the input parameter, unless overridden by the mapper.