Prop dynamic
Entity Description
A prop that can be placed in hierarchy and can play animations. 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_physics (i.e. it should be physically simulated) then it can not be used as a prop_dynamic. Upon level load it will display a warning in the console and remove itself. Use a prop_physics or prop_dynamic_override instead.
Keyvalues
- <choices> Collisions
Literal Value Description 0 Not Solid 2 Use Bounding Box 6 Use VPhysics
- DefaultAnim
- <string> The name of the idle animation that this prop will revert to whenever it finishes a random or forced animation.
- RandomAnimation
- <choices>
Literal Value Description 0 No 1 Yes
- MinAnimTime
- <float> Minimum time between random animations.
- MaxAnimTime
- <float> Maximum time between random animations.
- fademindist
- <float> Distance at which the prop starts to fade. (<0 = use fademaxdist)
- fademaxdist
- <float> Max fade distance at which the prop is visible. (0 = don't fade out)
- fadescale
- <float> If you specify a fade in the worldspawn, or if the engine is running under DX7, then 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."
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
- Template:I parentname
- 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.
- Template:I enabledisable
- 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.
Notes
This entity cannot be moved on its own; however, it can be parented to a moving object such as a func_physbox.
So if you wanted to make the butcher knife in props_lab into a knife you can actually pick up, you can create it as a prop_dynamic entity and parent it to an invisible func_physbox.
Modelled buttons can be used by covering a prop_dynamic button with a func_button, and then targeting the prop_dynamic with the SetAnimation input.
Levers can be used by covering a prop_dynamic with a func_button_rot. Parent the prop_dynamic to the func_button_rot.
Valves can be created by using a prop_dynamic with a valve model and covering the prop_dynamic with momentary_rot_button. Parent the prop_dynamic to the momentary_rot_button.