Difference between revisions of "Template:KV BasePropPhysics"

From Valve Developer Community
Jump to: navigation, search
m
(...and it's completely wrong.)
Line 15: Line 15:
 
: Multiplier for the object's mass.
 
: Multiplier for the object's mass.
 
; Override Parameters <code><[[string]]></code>
 
; Override Parameters <code><[[string]]></code>
: In general, can modify [[QC]] commands (defined as $key) such as for modifying physics keyvalues that are usually [[prop_data|embedded in the model]]. Format is <code>key,value,key,value,...</code> where any additional values embedded within a value are separated by a colon. For example, <code>keyvalue,prop_data:base:Wooden.Medium,keyvalue,prop_data:dmg.bullets:1,mass,3000,...</code>}}
+
: A list of physics keyvalues that are usually [[prop_data|embedded in the model]]. Format is <code>key,value,key,value,...</code>
 
; Health Level to Override Motion <code><int></code>
 
; Health Level to Override Motion <code><int></code>
 
: If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
 
: If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.

Revision as of 00:25, 15 September 2011

BasePropPhysics:

Min Damage to Hurt <int>
The prop will ignore any damage events if the damage is less than this amount.
Shadow Cast Distance <int>
Use this to override how far this object casts shadows. 0 means the default distance.
Physics Impact Damage Scale <float>
Multiplies damage received from physics impacts. 0 means the feature is disabled for backwards compatibility.
Impact damage type <bool>
If true, damage type is sharp and the object can slice others.
Damaging it Doesn't Push It <bool>
Whether damaging the entity applies force to it.
Scale Factor For Inertia <float>
Scales the angular mass of an object. Used to hack angular damage and collision response.
Mass Scale <float>
Multiplier for the object's mass.
Override Parameters <string>
A list of physics keyvalues that are usually embedded in the model. Format is key,value,key,value,...
Health Level to Override Motion <int>
If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
Physics Impact Force to Override Motion <float>
If specified, this object will start motion disabled. Any impact that imparts a force greater than this value will enable motion.
puntsound <string> (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Sound to make when punted by the Gravity Gun.

Studiomodel:

World Model (model) <string>
The model this entity should appear as. 128-character limit.
Skin (skin) <integer>
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.
Model Scale (modelscale) <float> (in all games since <Source><Source>)
A multiplier for the size of the model.

Shadow:

Disable Shadows (disableshadows) <boolean>
Prevents the entity from creating cheap render-to-texture shadows, or lightmap shadows if the entity is a prop_static. Does not affect shadow mapping.
Disable ShadowDepth (disableshadowdepth) <boolean> (in all games since [Portal 2])
Used to disable rendering into shadow depth (for projected textures) for this entity.
Projected Texture Cache (shadowdepthnocache) <choices> (in all games since [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 (disableflashlight) <boolean> (in all games since [Portal 2])
Used to disable projected texture lighting and shadows on this entity.

Reflection:

Render in Fast Reflections (drawinfastreflection) <boolean> (in all games since [Portal 2])
If enabled, this entity will render in fast water reflections (i.e. when a water material specifies $reflectonlymarkedentities) and in the world impostor pass.

BreakableProp:

Explosion Damage (ExplodeDamage) <float>
If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also Explosion Radius.
Explodsion Radius (ExplodeRadius) <float>
If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also Explosion Damage.
Sound to make when punted (puntsound) <sound> (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Sound to make when punted by gravity gun.
Break Model Message (BreakModelMessage) <string>
"If set, will use this break model message instead of the normal break behavior."
Confirm:Is this new with Source SDK 2013...? It isn't in Alien Swarm or 2007 code but is in 2013. New with L4D?

Breakable (common):

Performance Mode (PerformanceMode) <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 (Xbox 360, PS3, etc)
  • 3: Reduced gibs
Min Damage to Hurt (minhealthdmg) <integer>
If a single hit to the object doesn't do at least this much damage, the prop won't take any of the damage it attempted to give.
Pressure Delay (PressureDelay) <float>
Seconds to delay breaking from pressure. Allows creaking/groaning sounds to play.
Health (health) <integer>
How close to breaking the object is.
Maximum Health (max_health) <integer>
Health cannot exceed this amount.
Physics Impact Damage Scale (physdamagescale) <float>
Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
Breakable By (BreakableType) <choices> (in all games since <Left 4 Dead>)
<Left 4 Dead><Left 4 Dead 2> only. Who can break this?
  • 0: Everyone
  • 1: All Infected
  • 2: Only Tanks

BaseFadeProp:

Start Fade Dist (fademindist) <float>
Distance at which the prop starts to fade.
End Fade Dist (fademaxdist) <float>
Max fade distance at which the prop is visible.
  • 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 (fadescale) <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.

DXLevelChoice:

Minimum DX Level (mindxlevel) <choices>
The entity will not exist if the engine is running outside the given range of DirectX Versions. Replaced by SystemLevelChoice from <Left 4 Dead> Left 4 Dead onwards.
Warning: If these are used, the object may break when the user switches their DirectX settings.
Maximum DX Level (maxdxlevel) <choices>

Angles:

Pitch Yaw Roll (Y Z X) (angles) <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.

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.

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (in all games since <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 (thinkfunction) <string> (in all games since <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.