Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Func breakable

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Contents

func_breakable

Source(core) Solid Entity


description

A brush entity that can be broken from damage, or an input.


properties

  • Prop Data propdata(choices) - default: Set to the best approximation of the size and material of this entity's brushes. If set, it will override this entity's health and damage taken from various weapons. See the prodata.txt file in the scripts directory of your mod to get a detailed list of what each propdata entry specifies.
    • 0 - None
    • 1 - Wooden.Tiny
    • 2 - Wooden.Small
    • 3 - Wooden.Medium
    • 4 - Wooden.Large
    • 5 - Wooden.Huge
    • 6 - Metal.Small
    • 7 - Metal.Medium
    • 8 - Metal.Large
    • 9 - Cardboard.Small
    • 10 - Cardboard.Medium
    • 11 - Cardboard.Large
    • 12 - Stone.Small
    • 13 - Stone.Medium
    • 14 - Stone.Large
    • 15 - Stone.Huge
    • 16 - Glass.Small
    • 17 - Plastic.Small
    • 18 - Plastic.Medium
    • 19 - Plastic.Large
    • 20 - Pottery.Small
    • 21 - Pottery.Medium
    • 22 - Pottery.Large
    • 23 - Pottery.Huge
    • 24 - Glass.Window
  • Strength health(integer) - default: 1
    Number of points of damage to take before breaking. 0 means don't break.
  • Material Type material(choices) - default: Set to the material type of the brush. Used to decide what sounds to make when damaged, and what gibs to produce when broken.
    • 0 - Glass
    • 1 - Wood
    • 2 - Metal
    • 3 - Flesh
    • 4 - CinderBlock
    • 5 - Ceiling Tile
    • 6 - Computer
    • 7 - Unbreakable Glass
    • 8 - Rocks
  • Gibs Direction explosion(choices) - default: Used to decide which direction to throw gibs when broken.
    • 0 - Random
    • 1 - Relative to Attack
    • 2 - Use Precise Gib Dir
  • Precise Gib Direction gibdir(angle) - default: 0 0 0
    Specifies the direction to throw gibs when this breakable breaks. Be sure to select Use Precise Gib Dir in the Gibs Direction field!
  • Damaging it Doesn't Push It nodamageforces(choices) - default: Used to determine whether or not damage should cause the brush to move.
    • 0 - No
    • 1 - Yes
  • Gib Model gibmodel(string)
    Used by HL1Port to specify a custom gib model to break into, overriding the 'Material Type'.
  • Spawn On Break spawnobject(choices) - default: When broken, an entity of the selected type will be created.
    • 1 - item_battery
    • 2 - item_healthkit
    • 3 - item_ammo_pistol
    • 4 - item_ammo_pistol_large
    • 5 - item_ammo_smg1
    • 6 - item_ammo_smg1_large
    • 7 - item_ammo_ar2
    • 8 - item_ammo_ar2_large
    • 9 - item_box_buckshot
    • 10 - item_flare_round
    • 11 - item_box_flare_rounds
    • 12 - item_ml_grenade
    • 13 - item_smg1_grenade
    • 14 - item_box_sniper_rounds
    • 15 - unused1
    • 16 - weapon_stunstick
    • 17 - weapon_ar1
    • 18 - weapon_ar2
    • 19 - unused2
    • 20 - weapon_ml
    • 21 - weapon_smg1
    • 22 - weapon_smg2
    • 23 - weapon_slam
    • 24 - weapon_shotgun
    • 25 - weapon_molotov
    • 26 - item_dynamic_resupply
  • Explode Magnitude explodemagnitude(integer) - default: 0
    If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage.
  • Pressure Delay pressuredelay(float) - default: 0
    Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart).
  • Origin (X Y Z) origin(origin)
    The position of this entity's center in the world. Rotating entities typically rotate around their origin.
  • Render Mode rendermode(choices) - default: Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.
    • 0 - Normal
    • 1 - Color
    • 2 - Texture
    • 3 - Glow
    • 4 - Solid
    • 5 - Additive
    • 7 - Additive Fractional Frame
    • 9 - World Space Glow
    • 10 - Dont Render
  • FX Amount (0 - 255) renderamt(integer) - default: 255
    The FX amount is used by the selected Render Mode.
  • FX Color (R G B) rendercolor(color255) - default: 255 255 255
    The FX color is used by the selected Render Mode.
  • Disable Receiving Shadows disablereceiveshadows(choices)
    • 0 - No
    • 1 - Yes
  • Disable shadows disableshadows(choices)
    • 0 - No
    • 1 - Yes
  • Min Damage to Hurt minhealthdmg(integer) - default: 0
    The prop will ignore any damage events if the damage is less than this amount.
  • Minimum Light Level _minlight(string)
    The minimum level of ambient light that hits this brush.
  • Physics Impact Damage Scale physdamagescale(float) - default: 1.0
    Scales damage energy when this object is hit by a physics object. NOTE


spawn flags

  • 1: Only Break on Trigger - default: OFF
  • 2: Break on Touch - default: OFF
  • 4: Break on Pressure - default: OFF
  • 512: Break immediately on Physics - default: OFF
  • 1024: Don't take physics damage - default: OFF


inputs

  • Kill(void)
    Removes this entity from the world.
  • KillHierarchy(void)
    Removes this entity and all its children from the world.
  • AddOutput(string)
    Adds an entity I/O connection to this entity. Format
  • FireUser1(void)
    Causes this entity's OnUser1 output to be fired.
  • FireUser2(void)
    Causes this entity's OnUser2 output to be fired.
  • FireUser3(void)
    Causes this entity's OnUser3 output to be fired.
  • FireUser4(void)
    Causes this entity's OnUser4 output to be fired.
  • SetParent(string)
    Changes the entity's parent in the movement hierarchy.
  • SetParentAttachment(string)
    Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
  • ClearParent(void)
    Removes this entity from the the movement hierarchy, leaving it free to move independently.
  • SetDamageFilter(string)
    Sets the entity to use as damage filter. Pass in an empty string to clear the damage filter.
  • Break(void)
    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. 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(void)
    Makes the breakable able to picked up by the physcannon.
  • DisablePhyscannonPickup(void)
    Makes the breakable not able to picked up by the physcannon.
  • EnableDamageForces(void)
    Damaging the entity applies physics forces to it.
  • DisableDamageForces(void)
    Damaging the entity does *not* apply physics forces to it.
  • DisableShadow(void)
    Turn shadow off.
  • EnableShadow(void)
    Turn shadow on.

outputs

  • OnUser1(void)
    Fired in response to FireUser1 input.
  • OnUser2(void)
    Fired in response to FireUser2 input.
  • OnUser3(void)
    Fired in response to FireUser3 input.
  • OnUser4(void)
    Fired in response to FireUser4 input.
  • OnBreak(void)
    Fired when this breakable breaks.
  • 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(void)
    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.

related tutorials

Submit your tutorial for func_breakable

Personal tools