Func breakable surf

From Valve Developer Community
Revision as of 16:57, 10 May 2008 by Beeswax (talk | contribs) (categorise - brushmodel entities)
Jump to navigation Jump to search

Template:Wrongtitle Template:Base brush

Description

A brush entity that defines a breakable surface, for partially breakable glass / tile / etc. All faces but the desired visible one must be marked as tools/toolsnodraw and that face must have exactly four sides. The material applied to the visible face must be set up to be breakable. Template:Brushmodel

Textures

The following standard textures are meant to work with this entity:

  • glass/glasswindowbreak070a (but not glass/glasswindowbreak070b!)

See also

Keyvalues

<integer> If surfacetype is set to "Glass", this value sets how fragile the glass pieces are after the surface has been broken.
  • surfacetype
<choices>
Literal Value Description
0 Glass
1 Tile

Inputs

Breaks the breakable completely. This will make the entity act like a normal func_breakable. If you wish to maintain the shattering behaviour/appearance, consider using the Shatter input below with a large radius value.
  • 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. If the breakable's health reaches zero it will break.
  • RemoveHealth <integer>
Removes health from the breakable. If the breakable's health reaches zero it will break.
  • EnablePhyscannonPickup
Makes the breakable able to picked up by the physcannon.
  • DisablePhyscannonPickup
Makes the breakable not able to picked up by the physcannon.
  • EnableDamageForces
Damaging the entity applies physics forces to it.
  • DisableDamageForces
Damaging the entity does not apply physics forces to it.
  • Shatter <vector>
Shatter the window. The input parameter, which must be provided, is a vector. The first two coordinates are the X,Y center of the shattering (as values from from 0-1). The third coordinate is the radius of the shatter, in inches. The format is simply x y z.

Outputs

Fired when this breakable breaks. (!activator is the breaker)
  • OnHealthChanged <float>
Fired when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].
  • OnPhysCannonDetach
Fired when the physcannon has ripped this breakable off of the wall. Only fired if ACT_PHYSCANNON_DETACH is defined in the model this breakable is using.