prop_dynamic_override

From Valve Developer Community
Jump to: navigation, search

prop_dynamic_override is a point entity available in all Source games. A variant of prop_dynamic which will permit using models designed to be used as prop_physics. Although this entity provides the freedom of turning physics props into dynamic props, 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.

Keyvalues

Health <integer>
Number of points of damage to take before breaking. 0 means don't break.

prop_dynamic_base:

Collisions <choices>
How entities should collide with this prop.
Default Animation <string>
The animation this prop will play when not doing a random or forced animation.
Randomly Animate <bool>
Makes the prop randomly select and play animations at intervals defined by the 'Min/Max Random Anim Time' KVs. In between the random animations, it will revert to playing 'Default Animation'.
Min Random Anim Time <float>
Max Random Anim Time <float>
The range of intervals between random animations.
Body Group <int>
The active $bodygroup.
Lighting Origin <targetname>
Select an info_target entity (NOT info_lighting) from which to sample lighting instead of the entity's origin.
Disable Bone Followers <boolean>
If the prop has a collision model, it will generate a phys_bone_follower entity for every attachment it has, and if there isn't any, it automatically adds a default one. These can quickly eat up the edict count! If set to Yes, the prop will not use bone followers, although the prop will no longer have a functioning collision model.
Tip:A model can be modified to to remove all attachments except the necessary needed, to save the edict count and allow a functioning collision model.
Hold Animation <boolean> (New with Alien Swarm)
If set, the prop will not loop its animation, but hold the last frame.
Lag Compensation <boolean> (New with Alien Swarm)
Set to Yes to lag compensate this prop. Should be used very sparingly!
Suppress Anim Sounds <boolean> (New with Portal 2)
If set, the prop will not play any sounds that are embedded in animations it plays.

Studiomodel:

World Model <string>
The model this entity should appear as. 128-character limit.
Skin <int>
Some models have multiple skins. This value selects from the index, starting with 0.
Tip:Hammer's model browser automatically updates this value if you use it to view different skins.
modelscale <float> (New with Team Fortress 2)
The scaling factor for the model

Shadow:

Disable shadows <boolean>
Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Disable ShadowDepth <boolean> (New with Portal 2)
Used to disable rendering into shadow depth (for projected textures) for this entity.
Projected Texture Cache <choices> (New with Portal 2)
Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
  • 0 : Default
  • 1 : No cache - render every frame
  • 2 : Cache it - render only once
Disable flashlight <boolean> (New with Portal 2)
Used to disable projected texture lighting and shadows on this entity.

BaseFadeProp:

Start Fade Dist <float>
End Fade Dist <float>
Distances at which the prop start and finish fading.
  • If start fade is <0, the prop will disappear instantly when end fade is hit.
  • If end fade is <0, the prop won't disappear at all. (This is the default behaviour.)
The values will scale appropriately if the prop is in a 3D Skybox.
Fade Scale <float>
If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in Ep1), props will fade out even if the fade distances above aren't specified. This value gives you some control over when this happens: 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. Using 0 turns off the forced fade altogether. See also the QC command $noforcedfade.

BreakableProp:

Pressure Delay <float>
Seconds to delay breaking from pressure. Allows creaking/groaning sounds to play.

Breakable:

Explosion Damage <float>
If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also Explosion Radius.
Explosion Radius <float>
If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also Explosion Damage.
Performance Mode <choices>
Used to limit the amount of gibs produced when this entity breaks, for performance reasons.
  • 0 : Normal
  • 1 : No Gibs
  • 2 : Full Gibs on All Platforms
  • 3 : Reduced gibs

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.

DamageFilter:

Damage Filter <targetname>
Name of the filter_damage_type entity that controls which entities can damage us.

Shadow:

Disable shadows <boolean>
Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Disable ShadowDepth <boolean> (New with Portal 2)
Used to disable rendering into shadow depth (for projected textures) for this entity.
Projected Texture Cache <choices> (New with Portal 2)
Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
  • 0 : Default
  • 1 : No cache - render every frame
  • 2 : Cache it - render only once
Disable flashlight <boolean> (New with Portal 2)
Used to disable projected texture lighting and shadows on this entity.

Reflection:

Render in Fast Reflections <boolean> (New with Portal 2)
If enabled, causes this entity/prop to to render in fast water reflections (i.e. when a water material specifies $reflectonlymarkedentities) and in the world impostor pass.

Global:

Global Entity Name <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.

RenderFields:

Render Mode <choices>
Set a non-standard rendering mode on this entity. See Render Modes for details.
FX Amount (0 - 255) <int>
Intensity of the selected render mode.
FX Color (R G B) <color255>
Color used by the selected render mode (if applicable).
Disable Receiving Shadows <bool>
Prevents the entity from receiving shadows.

RenderFXChoices:

Render FX <choices>
Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.

DXLevelChoice:

Minimum DX Level <choices>
Maximum DX Level <choices>
The entity will not exist if the engine is running outside the given range of DirectX Versions. Don't use this with anything that will break saved games should a player switch dxlevel!
  • Default (no bounding)
  • DX7
  • DX8
  • DX8.1
  • DX9 SM2
  • DX9 SM3

Angles:

Pitch Yaw Roll (Y Z X) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Parentname:

Parent <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.

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.
AnimateEveryFrame <boolean> (New with Portal 2)
Force this prop to animate every frame. Don't use this unless you know what you are doing.
Note:This keyvalue is only on the prop_dynamic_override, it is not on the prop_dynamic
Note:This can be used so that the prop accepts negative values for the input "setplaybackrate" so the prop does reverse animations.

To do:  find other purposes for this keyvalue

Flags

prop_dynamic_base:

  • 64 : Use Hitboxes for Renderbox
  • 256 : Start with collision disabled

BreakableProp:

  • 16 : Break on Touch
  • 32 : Break on Pressure

Inputs

SetAnimation <string>
Force the prop to play the named animation.
SetDefaultAnimation <string>
Change the animation played when not in a random/forced sequence.
SetPlaybackRate <float>
Set the framerate at which animations are played.
SetBodyGroup <int>
Set the index of the visible $bodygroup.
TurnOn
TurnOff
Control the prop's visibility.
EnableCollision
DisableCollision
Control collisions with the prop.
SetAnimationNoReset  <string> (New with Alien Swarm)
Force the prop to play an animation unless the prop is already playing the animation. The parameter should be the name of the animation.
SetLightingOrigin  !FGD
Set the prop's lighting origin to that of a specified info_target.
This input is not included in Valve's FGDs.
BecomeRagdoll  (New with Portal 2)
Change into a ragdoll immediately.
FadeAndKill  (New with Portal 2)
Fade out then remove this prop.

Studiomodel:

Skin <int>
Changes the model's skin to the specified number.
SetBodyGroup <int>
Set the model's body group.
EnableShadow
DisableShadow
Control the model's cheap render-to-texture shadow.
AlternativeSorting <bool>
Used to attempt to fix sorting problems when rendering. To do: What is the effect?
SetModelScale  <float> (New with Team Fortress 2)
Sets the model scaling factor

BaseFadeProp:

Start Fade Dist <float>
Distance at which the prop starts to fade (<0 = use fademaxdist).
End Fade Dist <float>
Max fade distance at which the prop is visible (0 = don't fade out)
Fade Scale <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.

Breakable:

Break
Breaks the breakable.
SetHealth  <integer>
Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
AddHealth  <integer>
Adds health to the breakable. If the breakable's health reaches zero it will break.
RemoveHealth  <integer>
Removes health from the breakable. If the breakable's health reaches zero it will break.
EnablePhyscannonPickup
Makes the breakable able to picked up by the Gravity Gun.
DisablePhyscannonPickup
Makes the breakable not able to picked up by the Gravity Gun.
SetMass  <float>
Set mass of this object.

Targetname:

Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although entities with a large number of children are killed marginally faster.
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 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug:
In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
Note:This input is missing from some games FGD files.
SetLocalOrigin  <origin> (New with Alien Swarm) !FGD
Set this entity's origin in the map.
Note:This input is missing from some games FGD files.
SetLocalAngles  <angles> (New with Alien Swarm) !FGD
Set this entity's angles in the map.
Note:This input is missing from some games FGD files.

DamageFilter:

SetDamageFilter  <string>
Sets the entity to use as damage filter. Pass in an empty string ("") to clear the damage filter.

Shadow:

DisableShadow
Turn shadow off.
EnableShadow
Turn shadow on.
DisableReceivingFlashlight  (New with Portal 2)
This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight  (New with Portal 2)
This object may receive light or shadows from projected textures.

Reflection:

DisableDrawInFastReflection  (New with Portal 2)
Turns off rendering of this entity in reflections when using $reflectonlymarkedentities in water material.
EnableDrawInFastReflection  (New with Portal 2)
Turn on rendering of this entity in reflections when using $reflectonlymarkedentities in water material.

RenderFields:

Alpha  <integer>
Set the sprite's alpha (0 - 255).
Color  <color255>
Set the sprite's color (R G B).

Parentname:

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.

Outputs

prop_dynamic_base:

OnAnimationBegun
OnAnimationDone
Fired whenever an animation starts/finishes playing.

Studiomodel:

OnIgnite
Fired when this object catches fire.

Breakable:

OnBreak
Fired when this breakable breaks. (activator is the breaker)
OnTakeDamage
The breakable has taken damage.
OnHealthChanged <float>
The health of the breakable has changed. Passes the new value as a normalised percentage of max health.
OnPhysCannonDetach
Prop has started its ACT_PHYSCANNON_DETACH activity (caused by the gravity gun ripping it from a wall).
OnPhysCannonAnimatePreStarted
OnPhysCannonAnimatePullStarted
Prop has started its ACT_PHYSCANNON_ANIMATE_PRE or ACT_PHYSCANNON_ANIMATE activities. Both are caused by the player trying to grab the prop with the gravity gun; ANIMATE_PRE plays once, then ANIMATE starts looping.
OnPhysCannonAnimatePostStarted
Prop has started its ACT_PHYSCANNON_ANIMATE_POST activity (caused by the player letting the prop go from the gravity gun).
OnPhysCannonPullAnimFinished
Prop has finished all gravity gun-related animations.

Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (New with Left 4 Dead)
This Output fires when the entity is killed and removed from the game.

See also