Канал в IRC
RusNet: #cmt
Func_breakable_surf

Func_breakable_surf

Table of contents
1 Entity Description
2 Keyvalues
3 Inputs
4 Outputs
5 See Also

Entity 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.

Textures

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


Keyvalues

<target_source> The name that other entities refer to this entity by.
<boolean> Used to disable dynamic shadow casting from this entity.
<target_destination> Name of the filter entity that controls which entities can damage us.
<float> If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'.
<float> If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'.
<choices> Used to limit the amount of gibs produced when this entity breaks, for performance reasons.
Literal Value Description
0 Normal
1 Limit Gibs
2 Full Gibs on All Platforms
<float> Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart).
<target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
<string> Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
<choices> 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 propdata.txt file in the scripts directory of your MOD to get a detailed list of what each entry specifies.
Literal Value Description
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
<integer> Number of points of damage to take before breaking. Will not break if set to 0.
<choices> Set to the material type of the brush. Used to decide what sounds to make when damaged, and what gibs to produce when broken.
Literal Value Description
0 Glass
1 Wood
2 Metal
3 Flesh
4 CinderBlock
5 Ceiling Tile
6 Computer
7 Unbreakable Glass
8 Rocks
<choices> Used to decide which direction to throw gibs when broken.
Literal Value Description
0 Random
1 Relative to Attack
2 Use Precise Gib Dir
<angle> Specifies the direction to throw gibs when this breakable breaks. Be sure to select Use Precise Gib Dir in the Gibs Direction (explosion) field!
<boolean> Used to determine whether or not damage should cause the brush to move.
<studio> Used by HL1Port to specify a custom gib model to break into, overriding the Material Type (material).
<choices> When broken, an entity of the selected type will be created.
Literal Value Description
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
13 item_smg1_grenade
14 item_box_sniper_rounds
16 weapon_stunstick
18 weapon_ar2
21 weapon_smg1
23 weapon_slam
24 weapon_shotgun
26 item_dynamic_resupply
<integer> If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage.
<float> Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart).
<choice>
Literal Value Description
0 Normal
1 Slow Pulse
2 Fast Pulse
3 Slow Wide Pulse
4 Fast Wide Pulse
5 Slow Fade Away
6 Fast Fade Away
7 Slow Become Solid
8 Fast Become Solid
9 Slow Strobe
10 Fast Strobe
11 Faster Strobe
12 Slow Flicker
13 Fast Flicker
14 Constant Glow
15 Distort
16 Hologram (Distort + fade)
17 Scale up
22 Spotlight FX
23 Cull By Distance (TEST)
24 Fade Wider Pulse
<choices> Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.
Literal Value Render Mode Description (Click for more info.)
0 Normal Default rendering.
1 Color Obsolete.
2 Texture Plain opacity.
3 Glow No Z buffer checks. Fixed size on screen.
4 Solid / Alphatest Obsolete. (Use alphatest capabilities in materials instead.)
5 Additive Obsolete. Add this entity's color to what's behind it.
7 Additive Fractional Frame Obsolete? Blend between animation frames.
8 Alpha Add (Not in FGD.) TODO: Write description.
9 World Space Glow No Z buffer checks. Fixed size in world (as opposed to on screen).
10 Dont Render / None Don't render.
<integer> FX Amount (0 - 255) - How opaque the entity will be rendered. (0 is fully transparent, while 255 is fully opaque). Will not work if the rendermode keyvalue is set to Normal or Dont Render.
<color255> FX Color - What color the entity will be rendered in (to the degree of the opacity set with renderamt).
<boolean>
<integer> If surfacetype is set to "Glass", this value sets how fragile the glass pieces are after the surface has been broken.
<choices>
Literal Value Description
0 Glass
1 Tile

Inputs

Removes this entity from the world.
Removes this entity and all its children from the world.
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Set the rendercolor.
Set the renderamt.
Changes the entity's parent in the movement hierarchy.
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
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. The entity will maintain it's position relative to the parent at the time it is attached.
Removes this entity from the the movement hierarchy, leaving it free to move independently.
Sets the entity to use as damage filter. Pass in an empty string to clear the damage filter.
Turn shadow off.
Turn shadow on.
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.
Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
Adds health to the breakable. If the breakable's health reaches zero it will break.
Removes health from the breakable. If the breakable's health reaches zero it will break.
Makes the breakable able to picked up by the physcannon.
Makes the breakable not able to picked up by the physcannon.
Damaging the entity applies physics forces to it.
Damaging the entity does not apply physics forces to it.
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 in response to FireUser1-4 inputs. See User Inputs and Outputs. !activator = activator
Fired when this breakable breaks. !activator = breaker
Fired when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].
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.

See Also


К оглавлению справочника

© Valve Developer Community
CMT (CS Mapping Tutorials) - © 2006-2011. Created by VM
[ Script Execution time: 0.0268 ]