Prop physics

From Valve Developer Community
Revision as of 16:23, 6 August 2018 by SharpOB (talk | contribs) (Fixed formatting in previous edit)
Jump to navigation Jump to search

Template:Base point It is used to add rigid, VPhysics-simulated models to the world.

The only value required for prop_physics to work is a path to a model. As long as that model is physics-enabled, the correct data will be loaded from it when the map starts. It is possible to change any embedded physics data with the "Override Parameters" keyvalue.

Tip.pngTip:Multiplayer maps should use prop_physics_multiplayer or prop_physics_respawnable. To create a jointed physics object, use prop_ragdoll.
Note.pngNote:This entity may also use the deprecated physics_prop for the classname, and is used in beta Half-Life 2 maps. The physics_prop classname is replaced by prop_physics when spawned.
Note.pngNote:prop_physics can be parented if the 'parentname' value is manually added with smartedit turned off. Parenting prop_physics can be unpleasant and buggy in some situations.

Consistency

Todo: Move this section to its own article.

Consistency becomes a large problem when dealing with the many prop models that the Source engine provides. From a player's perspective, object interactivity should remain consistent across all the levels of your game / mod. (Why? Shouldn't the level designer have control over this, dependent on the context of the prop's use?) To enforce this, the game-related data of props is stored within the model itself.

Models that are meant to be physically simulated (chairs, tables, wooden planks, etc) will remove themselves if they are placed as prop_static or prop_dynamic entities. Other game-related data, such as mass, "health", gib amount & models, and so on are all stored inside the prop model as well.

The method by which they are stored, and guidelines for how to set it up, can be found in the Prop Data section of the model's QC file.

See also

Keyvalues

Note.pngNote:Page left for viewable history, content moved to prop_physics

RenderFields:


Render Mode (rendermode) <byte choices>
Set a non-standard rendering mode on this entity.
Render Modes
  • 0: Normal
  • 1: Color
  • 2: Texture
  • 3: Glow
  • 4: Solid/Alphatest Obsolete
  • 5: Additive
  • 6: Removed, does nothing Obsolete
  • 7: Additive Fractional Frame
  • 8: Alpha Add
  • 9: World Space Glow
  • 10: Don't Render
Render FX (renderfx) <byte choices>
Various somewhat legacy alpha effects. See render effects.
Render Amount / Transparency (renderamt) <byte>
Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color tint.

Flags

Note.pngNote:Page left for viewable history, content moved to prop_physics

Inputs

Ignite
Ignite, burst into flames.
IgniteLifetime <floatRedirectInput/float>
Ignite with the given lifetime.
Todo: Before the flames extinguish, or before health reaches zero?
IgniteNumHitboxFires <integerRedirectInput/integer>
Ignite with the given number of hitbox fires.
IgniteHitboxFireScale <floatRedirectInput/float>
Ignite with the given hitbox fire scale.
Note.pngNote:Page left for viewable history, content moved to prop_physics

RenderFields:

Alpha <integer 0–255>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its rendermode set to a number other than 0.
Color <color255RedirectInput/color32>
Sets an RGB color for the entity.

Outputs

Note.pngNote:Page left for viewable history, content moved to prop_physics

physics_prop

physics_prop is the predecessor name to prop_physics. It was used in early Half-Life 2 Beta maps, before being replaced by prop_physics later in development. This classname links to the same entity and the classname is also replaced with prop_physics after spawning.