This article's documentation is for anything that uses the Source engine. Click here for more information.

$cmdlist: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added an example)
m (Edited example a bit, as well as alphabetically ordering options.)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{this is a|QC command|name=$cmdlist}} It creates a reusable list of <code>[[$animation]]</code> tokens, allowing you to reuse the same set of options for multiple <code>$animation</code>s.<br>
{{this is a|QC command|name=$cmdlist}} It creates a reusable list of <code>[[$animation]]</code> tokens, allowing you to reuse the same set of options for multiple $animations.<br>
This in turn lets you not only save space, but also lets you edit multiple animations at once.
This in turn lets you not only save space, but also lets you edit multiple animations at once.


Line 8: Line 8:
=== Example ===
=== Example ===
<source>
<source>
$cmdlist shared_stuff {
$cmdlist shared_stuff { ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 }
Subtract a_idle 0
 
ikrule rhand touch Weapon usesource  
$Sequence "shoot" "anim/shoot" cmdlist shared_stuff         delta ACT_VM_PRIMARYATTACK_LAYER
ikrule lhand touch Weapon usesource
$Sequence "draw"  "anim/draw" cmdlist shared_stuff         delta ACT_VM_DEPLOY_LAYER
}
$Sequence "reload" "anim/reload" cmdlist shared_stuff         delta ACT_VM_RELOAD_LAYER
$Sequence "shoot" "anim/shoot" cmdlist shared_stuff delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence "draw"  "anim/draw" cmdlist shared_stuff delta ACT_VM_DEPLOY_LAYER
$Sequence "reload" "anim/reload" cmdlist shared_stuff delta ACT_VM_RELOAD_LAYER
</source>
</source>


Without using cmdlist, the QC would look like this<source>
Without using cmdlist, the QC would look like this<source>
$Sequence "shoot" "anim/shoot" ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence "shoot" "anim/shoot" ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0         delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence "draw"  "anim/draw" ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 delta ACT_VM_DEPLOY_LAYER
$Sequence "draw"  "anim/draw" ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0         delta ACT_VM_DEPLOY_LAYER
$Sequence "reload" "anim/reload" ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 delta ACT_VM_RELOAD_LAYER
$Sequence "reload" "anim/reload" ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0         delta ACT_VM_RELOAD_LAYER
</source>
</source>
== Options (similar to [[$animation]]) ==
 
*fixuploop
== Options ==
*weightlist
These commands are available to be used inside a cmdlist. Essentially the same as [[$animation]], but with less options. <br>
*subtract
As example <code>Frames</code> is missing.
*presubtract
*alignto
*align
*align
*alignboneto
*alignboneto
*alignto
*compress
*counterrotate
*counterrotateto
*derivative
*fixuploop
*ikfixup
*ikrule
*lineardelta
*match
*match
*matchblend
*matchblend
*noanimation
*numframes
*presubtract
*rotateto
*splinedelta
*subtract (but not delta)
*walkalign
*walkalignto
*walkframe
*weightlist
*worldspaceblend
*worldspaceblend
*worldspaceblendloop
*worldspaceblendloop
*rotateto
*ikrule
*ikfixup
*walkframe
*walkalignto
*walkalign
*derivative
*noanimation
*lineardelta
*splinedelta
*compress
*numframes
*counterrotate
*counterrotateto


== See also ==
== See also ==

Revision as of 08:33, 17 December 2024

English (en)Translate (Translate)

$cmdlist is a QC command available in all Source Source games. It creates a reusable list of $animation tokens, allowing you to reuse the same set of options for multiple $animations.
This in turn lets you not only save space, but also lets you edit multiple animations at once.

Syntax

$cmdlist (name) [options...]

Example

$cmdlist shared_stuff { ikrule rhand touch Weapon usesource  ikrule lhand touch Weapon usesource Subtract a_idle 0 }

$Sequence	"shoot"		"anim/shoot"	cmdlist shared_stuff          delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence	"draw"  	"anim/draw"		cmdlist shared_stuff          delta ACT_VM_DEPLOY_LAYER
$Sequence	"reload" 	"anim/reload"	cmdlist shared_stuff          delta ACT_VM_RELOAD_LAYER

Without using cmdlist, the QC would look like this

$Sequence	"shoot"		"anim/shoot"	ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0          delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence	"draw"  	"anim/draw"		ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0          delta ACT_VM_DEPLOY_LAYER
$Sequence	"reload" 	"anim/reload"	ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0          delta ACT_VM_RELOAD_LAYER

Options

These commands are available to be used inside a cmdlist. Essentially the same as $animation, but with less options.
As example Frames is missing.

  • align
  • alignboneto
  • alignto
  • compress
  • counterrotate
  • counterrotateto
  • derivative
  • fixuploop
  • ikfixup
  • ikrule
  • lineardelta
  • match
  • matchblend
  • noanimation
  • numframes
  • presubtract
  • rotateto
  • splinedelta
  • subtract (but not delta)
  • walkalign
  • walkalignto
  • walkframe
  • weightlist
  • worldspaceblend
  • worldspaceblendloop

See also