$cmdlist: Difference between revisions
Jump to navigation
Jump to search

Trigger hurt (talk | contribs) m (Making use of the "this is a" template for the first line here + cleanup for consistency with other QC commands.) |
(added an example) |
||
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. | {{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 in turn lets you not only save space, but also lets you edit multiple animations at once. | |||
== Syntax == | == Syntax == | ||
$cmdlist (name) [options...] | $cmdlist (name) [options...] | ||
=== Example === | |||
<source> | |||
$cmdlist shared_stuff { | |||
Subtract a_idle 0 | |||
ikrule rhand touch Weapon usesource | |||
ikrule lhand touch Weapon usesource | |||
} | |||
$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> | |||
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 "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 | |||
</source> | |||
== Options (similar to [[$animation]]) == | == Options (similar to [[$animation]]) == | ||
*fixuploop | *fixuploop |
Revision as of 11:01, 12 August 2024


$cmdlist
is a QC command available in all Source games. It creates a reusable list of
$animation
tokens, allowing you to reuse the same set of options for multiple $animation
s.
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 {
Subtract a_idle 0
ikrule rhand touch Weapon usesource
ikrule lhand touch Weapon usesource
}
$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 (similar to $animation)
- fixuploop
- weightlist
- subtract
- presubtract
- alignto
- align
- alignboneto
- match
- matchblend
- worldspaceblend
- worldspaceblendloop
- rotateto
- ikrule
- ikfixup
- walkframe
- walkalignto
- walkalign
- derivative
- noanimation
- lineardelta
- splinedelta
- compress
- numframes
- counterrotate
- counterrotateto