Func_physbox
Table of contents1 Entity Description2 Keyvalues3 Flags4 Inputs5 OutputsEntity Description
A brush entity that is treated as a physics object.
Keyvalues
- <origin> The position of this entity's center in the world. Rotating entities rotate around their origin.
- <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> The minimum level of ambient light that hits this brush.
- <boolean> If set, damage type is sharp, otherwise blunt
- <float> A scale multiplier for the object's mass.
- <string> A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'.
- <integer> If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
- <float> If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion.
- <vector> If the 'Use Preferred Carry Angles' spawnflag is set, this angle is the angle which the object should orient to when the player picks it up, with the physgun or +USE.
- <boolean> Not solid to world
Flags
- 1 : Only Break on Trigger
- 2 : "Break on Touch
- 4 : "Break on Pressure
- 512 : Break immediately on Physics
- 1024 : Don't take physics damage
- 4096 : Start Asleep
- 8192 : Ignore +USE for Pickup
- 16384 : Debris - Don't collide with the player or other debris
- 32768 : Motion Disabled
- 65536 : Use Preferred Carry Angles
- 131072 : Enable motion on Physcannon grab
- 262144 : Not affected by rotor wash
- 524288 : Generate output on +USE
- 1048576 : Physgun can ALWAYS pick up. No matter what. [Episode One Update]
- 2097152 : Physgun is NOT allowed to pick this up. [Episode One Update]
- 4194304 : Physgun is NOT allowed to punt this object. [Episode One Update]
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.
- Turn shadow off.
- Turn shadow on.
- Breaks the breakable.
- 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.
- SetParent <target_destination>
- Changes the entity's parent in the movement hierarchy.
- SetParentAttachment <string>
- 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.
- SetParentAttachmentMaintainOffset <vector> [Episode One Update]
- 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.
- Damaging the entity applies physics forces to it.
- Damaging the entity does *not* apply physics forces to it.
- Set the rendercolor.
- Set the renderamt.
- Wake up this physics object, if it is sleeping.
- Put this physics object to sleep. It will wake if given the Wake input, or if force is applied to it. Note that physics objects go to sleep automatically after coming to rest for a while, so you don't really need to use this.
- Enable physics motion/collision response.
- Disable physics motion/collision response.
- If this object is being carried by a player, with the physgun or +USE, force it to be dropped.
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.
- OnPhysCannonAnimatePreStarted [Episode One Update]
- Fired when this prop starts playing the Pre physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE_PRE activity is defined in the model this breakable is using.
- OnPhysCannonAnimatePullStarted [Episode One Update]
- Fired when this prop starts playing the physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE activity is defined in the model this breakable is using. If the prop has Pre pull anim, this will be fired after the Pre anim has finished playing.
- OnPhysCannonPullAnimFinished [Episode One Update]
- Fired when this prop has finished playing the physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE activity is defined in the model this breakable is using. If the prop has Pre & Post pull anims, this will be fired after the Post anim has finished playing.
- OnPhysCannonAnimatePostStarted [Episode One Update]
- Fired when this prop starts playing the Post physcannon-pull activity. Only fired if the ACT_PHYSCANNON_ANIMATE_POST activity is defined in the model this breakable is using.
- Fired when this entity is damaged.
- Fired when this entity becomes awake (collision/force is applied).
- Fired when motion is enabled due to damage/physcannon/force.
- Fired when a player picks this object up, either with the physgun or +USE.
- Fired when a player drops this object.
- Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.
- OnPhysGunOnlyPickup [Episode One Update]
- Fired when a player picks this object up WITH THE PHYSGUN. +USE pickups do not fire this output.
К оглавлению справочника
©
Valve Developer Community