Prop dynamic
prop_dynamic is a core Source engine entity used to add a moving model to a map. "Moving" can mean either animating, or literally travelling between positions within the world. A prop_dynamic will not move around of its own accord however: it must be parented to another entity. For instance, to create a functional Razortrain you would parent the various engines and carriages (as prop_dynamic) to an invisible func_tracktrain.
Dynamic props receive "point lighting": one value, refreshed every frame, is applied to the entire model. Exceptions to this are point_spotlights (per-vertex) and env_projectedtextures (per-pixel).
Dynamic props can be configured to break apart after receiving a given amount of damage. But health set inside the model will override health set in Hammer!


Tips
- Buttons can be created by enveloping a prop_dynamic button inside an invisible func_button, then using the SetAnimation input.
- Similarly, levers can be created by enveloping a prop_dynamic lever inside a func_rot_button (or momentary_rot_button). No animations needed this time!
See also
- 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.
Keyvalues
- Parent (parentname) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
- Global Entity Name (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.
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enable
input).
- solid
- <choices> Collisions.
Literal value Description 0 Not Solid 2 Use Bounding Box 6 Use VPhysics
Flags
- BreakableProp:
- Break on Touch : [16]
- Break on Pressure : [32]
- Will break after being stood on for
PressureDelay
seconds.Note:Some models will break instantly if this is or isn't set. (e.g.
militiawindow02_breakable.mdl
,window_industrial.mdl
)
- 64 : Use Hitboxes for Renderbox
Inputs
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string >
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string >
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
- Studiomodel:
- SetBodyGroup <integer >
- Set the model's body group.
- AlternativeSorting <boolean >
- Uses an alternative method for telling which objects are in front of others. Use if this object draws incorrectly when seen through transparent things.
- SetModelScale <string > (in all games since
) (also in
)
- Sets the model scale. Takes two values separated by a space. The first is the target model scale. The second value is the number of seconds the change in scale will be spread over. If there is no second value, the model will scale instantly.
Warning:Negative or extremely high values can cause crashes!
Shadow:
- DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying EF_NOSHADOW.
- EnableShadow
- Turn dynamic shadows on for this entity.
- DisableReceivingFlashlight (in all games since
)
- This object will not receive light or shadows from projected textures.
- EnableReceivingFlashlight (in all games since
)
- This object may receive light or shadows from projected textures.
Reflection:
- DisableDrawInFastReflection (in all games since
)
- Turns off rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
- EnableDrawInFastReflection (in all games since
)
- Turn on rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
- DisableDraw (in all games since
)
- Add the EF_NODRAW flag to this entity. Some entities manage this on their own so be aware you can override that value.
- EnableDraw (in all games since
)
- Remove the EF_NODRAW flag from this entity. Some entities manage this on their own so be aware you can override that value.
- EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
- SetAnimation <string>
- Force the prop to play an animation. The parameter should be the name of the animation.
- SetDefaultAnimation <string>
- Set the default animation (DefaultAnim) to the one specified in the parameter."
- SetBodyGroup <integer>
- Set the visible bodygroup, by index.
- TurnOn
- Make the prop visible.
- TurnOff
- Make the prop invisible.
Outputs
- Studiomodel:
- OnIgnite
- Fired when this object catches fire.
- OnAnimationBegun
- Fired whenever a new animation has begun playing.
- OnAnimationDone
- Fired whenever an animation is complete.
- OnOutOfWorld
- Fired whenever the entity leaves map boundaries.