Prop physics: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{toc-right}}
{{toc-right}}


{{base_point|prop_physics}} It is used to add rigid, [[VPhysics]]-simulated [[model]]s to the world. {{wrongtitle|prop_physics}}
{{base_point|prop_physics}} It is used to add rigid, [[VPhysics]]-simulated [[model]]s to the world.


The only value required for prop_physics to work is a path to a model. As long as that model is [[prop_data|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.
The only value required for prop_physics to work is a path to a model. As long as that model is [[prop_data|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.
Line 10: Line 10:


== Consistency ==
== Consistency ==
{{todo|Move this section to its own article.}}
{{todo|Move this section to its own article.}}


Line 20: Line 19:


== See also ==
== See also ==
* <code>[[prop_data]]</code>
* <code>[[prop_data]]</code>
* [[Prop Types Overview]]
* [[Prop Types Overview]]
Line 31: Line 29:


== Keyvalues ==
== Keyvalues ==
 
{{KV BasePropPhysics}}
{{KV RenderFields}}
{{KV RenderFields}}
{{KV BasePropPhysics}}


== Flags ==
== Flags ==
Line 39: Line 36:


== Inputs ==
== Inputs ==
 
{{IO|Ignite|Ignite, burst into flames.}}
; <code>Ignite</code>
{{IO|IgniteLifetime|<code>Ignite</code> with the given lifetime. {{todo|Before the flames extinguish, or before health reaches zero?}}|param=float}}
: Burst into flames.
{{IO|IgniteNumHitboxFires|<code>Ignite</code> with the given number of hitbox fires.|param=integer}}
; <code>IgniteLifetime <[[float]]></code>
{{IO|IgniteHitboxFireScale|<code>Ignite</code> with the given hitbox fire scale.|param=float}}
: Ignite, with the given lifetime. {{todo|Before the flames extinguish, or before health reaches zero?}}
{{I BasePropPhysics}}
; <code>IgniteNumHitboxFires <[[int]]></code>
: Ignite with the given number of hitbox fires.
; <code>IgniteHitboxFireScale <[[float]]></code>
: Ignite with the given hitbox fire scale.
{{I RenderFields}}
{{I RenderFields}}
{{I BasePropPhysics}}


== Outputs ==
== Outputs ==
{{O BasePropPhysics}}
{{O BasePropPhysics}}


[[Category:Physics]]
[[Category:Physics]]

Revision as of 15:51, 28 July 2011

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:prop_physics cannot normally be parented, though a parent value can be manually added if smartedit is turned off.

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