Prop physics: Difference between revisions
m (Category:Physics) |
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. | {{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}} | ||
== Flags == | == Flags == | ||
Line 39: | Line 36: | ||
== Inputs == | == Inputs == | ||
{{IO|Ignite|Ignite, burst into flames.}} | |||
{{IO|IgniteLifetime|<code>Ignite</code> with the given lifetime. {{todo|Before the flames extinguish, or before health reaches zero?}}|param=float}} | |||
{{IO|IgniteNumHitboxFires|<code>Ignite</code> with the given number of hitbox fires.|param=integer}} | |||
{{IO|IgniteHitboxFireScale|<code>Ignite</code> with the given hitbox fire scale.|param=float}} | |||
{{I BasePropPhysics}} | |||
{{I RenderFields}} | {{I RenderFields}} | ||
== 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.


Consistency
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

RenderFields:
- Render Mode (rendermode) <byte choices>
- Set a non-standard rendering mode on this entity.
Render Modes
- 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

Inputs
- Ignite
- Ignite, burst into flames.
- IgniteLifetime <float >
Ignite
with the given lifetime.Todo: Before the flames extinguish, or before health reaches zero?
- IgniteNumHitboxFires <integer >
Ignite
with the given number of hitbox fires.
- IgniteHitboxFireScale <float >
Ignite
with the given hitbox fire scale.

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 than0
.
- Color <color255 >
- Sets an RGB color for the entity.
Outputs
