$body: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (→‎Options: huh)
Line 10: Line 10:


;<code><name></code>
;<code><name></code>
:Can be any string value. Used to refer to the body in [[HLMV]] and [[C++]].
:Can be any string value. Used to refer to the body in [[HLMV]] and C++.
;<code><reference SMD></code>
;<code><reference SMD></code>
:Path to a 'reference' (aka 'model') SMD, relative to the QC file's [[$cd|current directory]].
:Path to a 'reference' (aka 'model') SMD, relative to the QC file's [[$cd|current directory]].

Revision as of 00:26, 26 April 2008

The $body QC command is used to specify a 'reference' SMD that contains vertex, UV map, skeleton and envelope data for the model. Without it, the model has no physical appearance and there is no context for animation data.

A name is given to a $body because it is possible for a model to have several - like the metrocop, who has one with a manhack attached and one without.

Tip.pngTip:More complex models with eyes, facial animation, etc. use $model instead of $body.

Options

$body	<name>	<reference SMD>
<name>
Can be any string value. Used to refer to the body in HLMV and C++.
<reference SMD>
Path to a 'reference' (aka 'model') SMD, relative to the QC file's current directory.

QC syntax example

$modelname		"weapons/shell.mdl"
$cdmaterials		"models/weapons/"
$body		shell	"shell-ref.smd"
$sequence	idle	"shell-idle.smd"

See also