$keyvalues: Difference between revisions
Jump to navigation
Jump to search
Warning:Since the values are arbitrary, studiomdl can't check that they are correct when it compiles the model.
TomEdwards (talk | contribs) m (we need an example of a custom KV and a one-dimensional KV) |
|||
Line 1: | Line 1: | ||
The [[QC command]] [[$keyvalues]] embeds a block of arbitrary [[keyvalue]]s into the .mdl file. | The [[QC command]] [[$keyvalues]] embeds a block of arbitrary [[keyvalue]]s into the .mdl file. | ||
{{warning|Since the values are arbitrary, [[studiomdl]] can't check that they are correct when it compiles the model.}} | |||
== Common KeyValues == | |||
;<code>[[Prop Data|prop_data]]</code> | |||
:Defines various properties for models for use in Valve's prop_* entities - usually [[prop_physics]] | |||
;<code>[[Prop Data#physgun interactions|physgun_interactions]]</code> | |||
:Defines any non-standard interactions with the [[Gravity Gun]] | |||
;<code>[[vehicle_entry]]</code> | |||
;<code>[[vehicle_exit]]</code> | |||
;<code>[[vehicle_escape_exit]]</code> | |||
:Animations for players (or NPCs?) entering or exiting a [[vehicle]] | |||
== QC syntax example == | == QC syntax example == | ||
Line 21: | Line 32: | ||
onbreak "explode_fire" | 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" | |||
} | } | ||
[[Category:QC Commands]] | [[Category:QC Commands]] |
Revision as of 05:14, 1 April 2008
The QC command $keyvalues embeds a block of arbitrary keyvalues into the .mdl file.

Common KeyValues
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
vehicle_entry
vehicle_exit
vehicle_escape_exit
- Animations for players (or NPCs?) entering or exiting a vehicle
QC syntax 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" }