Prop physics override
From Valve Developer Community
This point-based entity is available in all Source games.
| Table of contents |
Entity Description
A prop type that will override the properties built into its model, making it work like a prop_physics entity. The health of props can also be overridden by using this entity.
Generally, if a prop_physics in your map has been removed because its model wasn't meant to be a physics prop, you can use this entity to still make it a prop_physics, without any drawbacks.
Although this entity provides the freedom of turning any prop into a physics prop, be aware of that players will rely on the behavior of props to be more or less consistent with other maps, and even other Source games.
- prop_physics
- Prop Types Overview
- Prop Footsteps - A tutorial that provides essential code for when players walk on entities like this, it's not ignored during footstep sound computation.
In code it is represented by class CPhysicsProp (http://doxygen.page.needed/class_c_physics_prop.html), defined in props.cpp (http://doxygen.page.needed/props_8cpp-source.html).
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- Pitch Yaw Roll (Y Z X)
- This entity's angular orientation in the world (also used for angular effect entities).
- globalname
- <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.
- model
- <studio> World Model (Maximum string length: 128)
- skin
- <integer> Some models have multiple versions of their textures called skins. Set this to a number other than 0 to use that skin instead of the default.
- disableshadows
- <boolean> Used to disable dynamic shadow casting from this entity.
- damagefilter <target_destination>
- Name of the filter_damage_type entity that controls which entities can damage us.
- ExplodeDamage <float>
- If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'.
- ExplodeRadius <float>
- If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'.
- PerformanceMode <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
- pressuredelay <float>
- Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart).
- mindxlevel
- <choices> Minimum DX Level
Literal Value Description 0 default (lowest) 70 dx7
- maxdxlevel
- <choices> Maximum DX Level
Literal Value Description 0 default (lowest) 60 dx6
- minhealthdmg
- <integer> The prop will ignore any damage events if the damage is less than this amount.
- shadowcastdist
- <integer> Use this to override how far this object casts shadows. 0 = default distance.
- physdamagescale
- <float> Scales damage energy when this object is hit by a physics object.
- Set to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials.
- Damagetype
- <boolean> If set, damage type is sharp, otherwise blunt.
- nodamageforces
- <boolean> Used to determine whether or not damage should cause the brush to move.
- inertiaScale
- <float> Scales the angular mass of an object. Used to hack angular damage and collision response.
- massScale
- <float> A scale multiplier for the object's mass.
- overridescript
- <string> A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'.
- damagetoenablemotion
- <integer> If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
- forcetoenablemotion
- <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.
- fademindist
- <float> Start Fade Dist/Pixels - Distance at which the prop starts to fade. (-1 = Use fademaxdist.)
Note: If this entity is in a 3D Skybox, this value will automatically be scaled properly.
- fademaxdist
- <float> End Fade Dist/Pixels - Max fade distance at which the prop is visible. (0 = Don't fade out.)
Note: If this entity is in a 3D Skybox, this value will automatically be scaled properly.
- fadescale
- <float> Fade Scale - If you specify a fade in the worldspawn, or if the engine is running under dx7, the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified. This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades. Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances.
- puntsound [Episode One Update]
- <sound> Sound to make when punted
- health
- <integer> Number of points of damage to take before breaking. Doesn't break with 0 set here.
Flags
- 1 : Start Asleep
- 2 : Don't take physics damage
- 4 : Debris - Don't collide with the player or other debris
- 8 : Motion Disabled
- 16 : Break on Touch
- 32 : Break on Pressure
- 64 : Enable motion on Physcannon grab
- 128 : Not affected by rotor wash
- 256 : Generate output on +USE
- 512 : Prevent pickup
- 1024 : Prevent motion enable on player bump
- 4096 : Debris with trigger interaction
- 8192 : Force server-side (Multiplayer only) [Episode One Update]
- If this object has to be server-side, set this flag. See sv_pushaway_clientside_size.
- 1048576 : Physgun can ALWAYS pick up. No matter what. [Episode One Update]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- 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.
- Skin <integer>
- Changes the model skin to the specified number.
- SetBodyGroup <integer>
- Set this prop's body group (from 0 - n). Changes the model body to the specified number.
- DisableShadow
- Turn shadow off.
- EnableShadow
- Turn shadow on.
- AlternativeSorting <bool> [Episode One Update]
- Used to attempt to fix sorting problems when rendering. True activates, false deactivates
- Wake
- Wake up this physics object, if it is sleeping.
- Sleep
- 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.
- EnableMotion
- Enable physics motion/collision response.
- DisableMotion
- Disable physics motion/collision response.
- DisableFloating
- Disable fluid/floating simulation to reduce cost.
- physdamagescale <float>
- Set the Physics Impact Damage Scale for this character.
- EnableDamageForces
- Damaging the entity applies physics forces to it.
- DisableDamageForces
- Damaging the entity does *not* apply physics forces to it.
- EnablePuntSound [Episode One Update]
- Allow this prop to play its own sound when punted
- DisablePuntSound [Episode One Update]
- Prevent this prop from playing its own sound when punted
- Ignite
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
- OnMotionEnabled
- Fired when motion is enabled on this prop, either via the Health Level to Override Motion keyvalue or from the EnableMotion input.
- OnAwakened
- Fired when this entity becomes awake (collision/force is applied to it while it's asleep).
- OnPhysGunPickup
- Fired when the player picks up the prop with the physcannon or +USE.
- !activator = player Deprecated [Episode One Update]
- OnPhysGunDrop
- Fired when the player drops the prop with the physcannon or +USE.
- !activator = player
- OnPlayerUse
- Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.
- !activator = player
- OnPhysGunOnlyPickup [Episode One Update]
- Fired when a player picks this object up WITH THE PHYSGUN. +USE pickups do not fire this output.
- OnPlayerPickup [Episode One Update]
- Fired whenever the player picks up this prop (with the physcannon or with +USE).
- OnOutOfWorld [Episode Two Update]
- OnHealthChanged [Episode Two Update]
- OnTakeDamage [Episode Two Update]
