$keyvalues: Difference between revisions
Jump to navigation
Jump to search
Note:Since the values are arbitrary, studiomdl can't check that they are correct when it compiles the model.
TomEdwards (talk | contribs) mNo edit summary |
TomEdwards (talk | contribs) (→Common KeyValues: door_options) |
||
Line 22: | Line 22: | ||
;<code>[[Particles On Models|particles]]</code> | ;<code>[[Particles On Models|particles]]</code> | ||
:Attaches [[:Category:Particle System|particles]]. | :Attaches [[:Category:Particle System|particles]]. | ||
; <code>[[prop_door_rotating#Custom door models|door_options]]</code> | |||
: Configures the model for use with [[prop_door_rotating]]. | |||
;<code>[[vehicle_entry]]</code> | ;<code>[[vehicle_entry]]</code> | ||
;<code>[[vehicle_exit]]</code> | ;<code>[[vehicle_exit]]</code> |
Revision as of 10:45, 1 January 2010
The QC command $keyvalues embeds a block of arbitrary keyvalues into the .mdl file.

Programmers can access the $keyvalues block with modelinfo->GetModelKeyValueText(GetModel())
and the KeyValues
class.
Syntax
$keyvalues { keyvalue data }
Common KeyValues
See Category:QC Keyvalues for a complete list.
prop_data
- Defines various properties for models for use in Valve's prop_* entities - usually prop_physics.
physgun_interactions
- Defines any non-standard interactions with the Gravity Gun.
particles
- Attaches particles.
door_options
- Configures the model for use with prop_door_rotating.
vehicle_entry
vehicle_exit
vehicle_escape_exit
- Animations for players (or NPCs?) entering or exiting a vehicle.
Example
$keyvalues { prop_data { base Wooden.Small dmg.bullets 0 explosive_damage 100 explosive_radius 100 } physgun_interactions { onfirstimpact break onfirstimpact paintsplat onlaunch spin_zaxis onbreak explode_fire } // hud_name has been made up as an example of a one-dimensional custom KV. // (If you were being picky, you might point out that it ought to be localised ...) hud_name "Rubber chicken with a pulley in the middle" }