Prop interactions
Jump to navigation
Jump to search
Prop interactions, also known as propdata interactions, are a group of independent KeyValues blocks that control how props handle interaction from outside forces, like being launched by the gravity gun, and how they should employ fire, like igniting after taking enough damage. They are embedded in a model with the $keyvalues QC command. They are defined in props_shared.h
and props_shared.cpp
.

- Todo: Did any of this change between engine versions?
Example
$keyvalues { physgun_interactions { preferred_carryangles "0 0 0" onworldimpact stick onfirstimpact paintsplat onlaunch spin_zaxis onbreak explode_fire } fire_interactions { ignite halfhealth explosive_resist yes flammable yes } }
Physgun interactions
The physgun_interactions KeyValues block affects how a prop or ragdoll is handled by and responds to the Gravity Gun. Despite the name, some interactions, like create_flare
, can be triggered by forces not related to the gravity gun.
Options
preferred_carryangles <angles>
- Sets the angles, relative to the player's orientation, at which the prop will be held when carried.
- This is used with the sawblades and propellers in Ravenholm, as well as the turret NPCs in Nova Prospekt.
onworldimpact <choices>
- When we hit the world after being thrown by the gravity gun.
stick
- Sticks to what we hit if we're traveling fast enough.
Note:Using the gravity gun to pick up a prop with this interaction automatically turns the prop into debris.
bloodsplat
- Non-functional interaction believed to have originally been a physics prop version of the below interaction of the same name.
onfirstimpact <choices>
- When we first hit something after being thrown.
break
- Breaks on colliding with anything after being launched.
paintsplat
- Applies paint decals to the first thing we hit after being launched.
Note:They come in 3 colors (Red, Green, Blue) by default, but each prop should stick to one color.
impale
- Sometimes impales the first NPC we hit and sticks it to the wall.
Warning:This interaction actually applies to any collisions after the first, so it occasionally runs several times per impact, which sometimes spawns too many ragdolls and/or crashes the game. This also has the stick interaction built-in, causing the prop to disappear sometimes due to the aforementioned collision rules.
lose_energy
- Apparently non-functional. (Can be found in
sawblade001a
.) bloodsplat
- Ragdolls only. Creates a blood decal on the first thing we hit.
alienbloodsplat
- Ragdolls only. Identical to
bloodsplat
, but uses alien blood instead.
onlaunch <choices>
- When we are flung by the gravity gun.
- Default
- Physgun applies random angular velocity to the prop as it launches.
spin_none
- Prop does not spin when launched.
spin_zaxis
- Prop should spin around the Z axis when launched by the physcannon. (e.g. Ravenholm propellers.)
Note:This automatically adds slash damage to the prop, allowing it to slice zombies.
onbreak <choices>
- When we are broken after being flung by the gravity gun.
- explode_fire
- Explodes in a fireball and ignites nearby enemies (that are flammable)
Tip:Use this in conjuction with fire_interactions to allow the prop to ignite before exploding and use prop_data to control explosive properties.
damage none
- Prop does not deal impact damage, meaning it cannot deal any damage directly from hitting anything else. The prop can still deal damage with other interactions.
allow_overhead yes
- Allows the gravity gun to carry the prop directly above the wielder.
Note:Some entities don't need this to allow the prop to be carried overhead. See
CGrabController::IsObjectAllowedOverhead()
. onpickup <choices>
- When picked up by the gravity gun...
- onpickup create_flare
- Emit a flare from the "fuse" attachment when picked up by any means.
Note:
HL2_EPISODIC
DLLs only; seeCBreakableProp::OnPhysGunPickup()
. - onpickup boogie
- Ragdolls only. Begins ragdoll boogie when released, providing visible electricity effects and causing the ragdoll to flail rapidly.
Fire interactions
The fire_interactions KeyValues block defines flammability. It is not required to make NPCs flammable.
- Todo: confirm whether unbreakable (health 0) models can be flammable.
Options
flammable yes
- Allows the prop to be ignited by fire and explosions.
ignite halfhealth
- Causes the prop to ignite spontaneously upon reaching 50% health.
explosive_resist yes
- Causes the prop to ignite instead of breaking when it is damaged by an explosion.
See Also
- prop_data
- Adnan's Rotational Grav Gun - a 4MB demo mod that simply allows the player to control the "carryangles" of objects held by the Gravgun.