Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Prop physics
From HalfLife 2 Knowledge Base
Contents |
prop_physics
Source(core) Point Entity
description
A prop that physically simulates as a single rigid body. It can be constrained to other physics objects using hinges or other constraints. It can also be configured to break when it takes enough damage. Note that the health of the object will be overridden by the health inside the model, to ensure consistent health game-wide. If the model used by the prop is configured to be used as a prop_dynamic (i.e. it should not be physically simulated) then it CANNOT be used as a prop_physics. Upon level load it will display a warning in the console and remove itself. You may use a prop configured to be a prop_dynamic (or a prop_static) as a prop_physics by using a Prop_physics_override. However, this will remove any built in properties the prop may have.
properties
- Min Damage to Hurt minhealthdmg(integer) - default: 0
The prop will ignore any damage events if the damage is less than this amount. - Shadow Cast Distance shadowcastdist(integer) - default: 0
Use this to override how far this object casts shadows. 0 = default distance. - Physics Impact Damage Scale physdamagescale(float) - default: 0.1
Scales damage energy when this object is hit by a physics object. NOTE - Impact damage type Damagetype(choices)
- 0 - Blunt
- 1 - Sharp
- 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
- Scale Factor For Inertia inertiaScale(float) - default: 1.0
Scales the angular mass of an object. Used to hack angular damage and collision response. - Mass Scale massScale(float) - default: 0
A scale multiplier for the object's mass. - Override Parameters 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'. - Health Level to Override Motion damagetoenablemotion(integer) - default: 0
If specified, this object will start motion disabled. Once it's health has dropped below this specified amount, it will enable motion. - Physics Impact Force to Override Motion forcetoenablemotion(float) - default: 0
If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion. - Start Fade Dist fademindist(float) - default: -1
Distance at which the prop starts to fade (<0 = use fademaxdist) - End Fade Dist fademaxdist(float) - default: 0
Max fade distance at which the prop is visible (0 = don't fade out) - fade scale fadescale(float) - default: 1
If you specify a fade in the worldspawn, or if the engine is running under dx7, or 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.
spawn flags
- 1: Start Asleep - default: OFF
- 2: Don't take physics damage - default: OFF
- 4: Debris - Don't collide with the player or other debris - default: OFF
- 8: Motion Disabled - default: OFF
- 64: Enable motion on Physcannon grab - default: OFF
- 128: Not affected by rotor wash - default: OFF
- 256: Generate output on +USE - default: ON
- 512: Prevent pickup - default: OFF
- 1024: Prevent motion enable on player bump - default: OFF
- 4096: Debris with trigger interaction - default: OFF
inputs
- Wake(void)
Wake up this physics object, if it is sleeping. - Sleep(void)
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(void)
Enable physics motion/collision response. - DisableMotion(void)
Disable physics motion/collision response. - DisableFloating(void)
Disable fluid/floating simulation to reduce cost. - SetBodyGroup(integer)
Set this prop's body group (from 0 - n). - physdamagescale(float)
Set the Physics Impact Damage Scale for this character. NOTE - EnableDamageForces(void)
Damaging the entity applies physics forces to it. - DisableDamageForces(void)
Damaging the entity does *not* apply physics forces to it.
outputs
- OnMotionEnabled(void)
Fired when motion is enabled on this prop, either via 'Health Level to Override Motion' or from the EnableMotion input. - OnAwakened(void)
Fired when this entity becomes awake (collision/force is applied to it while it's asleep). - OnPhysGunPickup(void)
Fired when the player picks up the prop with the physcannon or +USE. - OnPhysGunDrop(void)
Fired when the player drops the prop with the physcannon or USE. - OnPlayerUse(void)
Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.
related tutorials
Submit your tutorial for prop_physics

