$definemacro

From Valve Developer Community
Revision as of 19:38, 7 November 2007 by Beeswax (talk | contribs)
Jump to navigation Jump to search
$definemacro (macroname) [named parameters ...]
  • Defines a named macro that can be use as a short hand way to specify other QC commands. The macro creates a block a named block of text, that when referred to will virtually insert that text into the QC file, along with replacing the named parameters with the specified values.

Example:

     $definemacro makeidlenoise idleNoiseName fileName \\
     $sequence $idleNoiseName$ {\\
          $fileName$ \\
          subtract $idleNoiseName$ 0 \\
          iklock lfoot 1 0 iklock rfoot 1 0 \\
          delta \\
          hidden \\
          realtime \\
     }
     $makeidlenoise idleNoise03 "Idle03"
     $makeidlenoise idleNoise04 "Idle04_v32"