$scale: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(minor cleanup and info)
Line 1: Line 1:
The [[QC command]] '''<code>$scale</code>''' modifies the size of the compiled model by a [[float]] value. The default value is <code>1</code>.
The [[QC command]] '''<code>$scale</code>''' modifies the size of the compiled model by a [[float]] value. A scale of 1.0 makes the model normal-sized, 0.5 is half-sized, and 2.0 is double-sized. The default value is <code>1</code>.


{{note|<code>$scale</code> only affects commands that are below it in the QC. For this reason, be sure to specify it on the first line!}}
{{note|<code>$scale</code> only affects .SMD file references (such as <code>$body</code> or <code>$model</code>) that are below it in the QC. For this reason, be sure to specify it before any file references!}}
 
== Syntax ==
 
$scale <scale amount>


== Example ==
== Example ==
Line 8: Line 12:
  [[$modelname]] "weapons/shell.mdl"
  [[$modelname]] "weapons/shell.mdl"
  [[$cdmaterials]] "models/weapons/"
  [[$cdmaterials]] "models/weapons/"
  [[$body]] shell "shell-ref.smd"
  [[$body]] shell "shell_ref.smd"
  [[$sequence]] idle "shell-idle.smd"
  [[$sequence]] idle "shell_idle.smd"


[[Category:QC Commands|S]]
[[Category:QC Commands|scale]]

Revision as of 17:10, 28 April 2008

The QC command $scale modifies the size of the compiled model by a float value. A scale of 1.0 makes the model normal-sized, 0.5 is half-sized, and 2.0 is double-sized. The default value is 1.

Note.pngNote:$scale only affects .SMD file references (such as $body or $model) that are below it in the QC. For this reason, be sure to specify it before any file references!

Syntax

$scale <scale amount>

Example

$scale			3
$modelname		"weapons/shell.mdl"
$cdmaterials		"models/weapons/"
$body		shell	"shell_ref.smd"
$sequence	idle	"shell_idle.smd"