Func breakable: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (minor tidy) |
||
Line 1: | Line 1: | ||
{{wrongtitle|title=func_breakable}} | {{wrongtitle|title=func_breakable}} | ||
==Entity | == Entity description == | ||
A [[Entity#Brush_entities|brush entity]] that can be broken from damage or an input. | A [[Entity#Brush_entities|brush entity]] that can be broken from damage or an input. | ||
==Availability== | == Availability == | ||
{{in game|brush}} {{game-base}} | {{in game|brush}} {{game-base}} | ||
{{in code|class=class_c_breakable.html CBreakable|file=func__break_8cpp-source.html func_break.cpp}} | {{in code|class=class_c_breakable.html CBreakable|file=func__break_8cpp-source.html func_break.cpp}} | ||
==Keyvalues== | == Keyvalues == | ||
* {{kv origin}} | * {{kv origin}} | ||
* {{kv breakablebrush}} | * {{kv breakablebrush}} | ||
Line 18: | Line 18: | ||
*'''physdamagescale''' | *'''physdamagescale''' | ||
:<float> Scales damage energy when this object is hit by a physics object. | :<float> Scales damage energy when this object is hit by a physics object. | ||
:{{note|0 means this feature is disabled for backwards compatibility. | :{{note|0 means this feature is disabled for backwards compatibility. Set to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials.}} | ||
==Flags== | == Flags == | ||
*{{fl breakablebrush}} | *{{fl breakablebrush}} | ||
==Inputs== | == Inputs == | ||
*{{i breakablebrush}} | *{{i breakablebrush}} | ||
*{{i shadow}} | *{{i shadow}} | ||
==Outputs== | == Outputs == | ||
*{{o breakablebrush}} | *{{o breakablebrush}} | ||
==See | == See also == | ||
* [[func_breakable_surf]] | |||
[[Category:Entities]] | |||
[[Category:Brush Entities]] | |||
[[Category:Entities]][[Category:Brush Entities]] |
Revision as of 04:38, 1 March 2008
Entity description
A brush entity that can be broken from damage or an input.
Availability
Template:In game Template:Game-base Template:In code
Keyvalues
- <integer> The prop will ignore any damage events if the damage is less than this amount.
- _minlight
- <integer> The minimum level of ambient light that hits this brush.
- physdamagescale
- <float> Scales damage energy when this object is hit by a physics object.
Note:0 means this feature is disabled for backwards compatibility. Set to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials.
Flags
- Breakable (brush):
- Only Break on Trigger : [1]
- Break on Touch : [2]
- Break on Pressure : [4]
- Break immediately on Physics : [512]
- Don't take physics damage : [1024]
- Don't allow bullet penetration : [2048]
Inputs
- BreakableBrush:
- Break
- Breaks the breakable.
- SetHealth <integer >
- Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
- AddHealth <integer >
- Adds health to the breakable.
- RemoveHealth <integer >
- Removes health from the breakable.
- SetMass <float >
- Damaging the entity applies physics forces to it.
Outputs
- BreakableBrush:
- OnBreak
- !activator = entity that breaks the object
!caller = this entity
Fired when this object breaks.
- OnHealthChanged <float >
- !activator = entity that caused the health change
!caller = this entity
Fired whenever the health of the breakable has increased or decreased. This output automatically puts the new health amount as a decimal percent (e.g. 45% = 0.45) into the parameter box for inputs, if the mapper does not override the parameter with something else.