$continue: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(add two more examples of a singlelined macros that can use $continue and explain that this QC Command works along $animation and $sequence)
(actual use for $continue is expand any previously declared $sequence or $animation. Add php syntax highlight)
Line 1: Line 1:
The '''$continue''' is a [[QC command]].
The '''$continue''' is a [[QC command]] for insert more parameters to [[$sequence|sequences]] and [[$animation|animations]] after declared, by expanding it. This somehow also allow expand [[$definemacro|macros]].
Place this immediately after a [[$definemacro|macro]] to trick the parser in thinking that you're on the same referenced [[$sequence|$sequence]] or [[$animation|$animation]].
 
{{tip|Place this immediately after a [[$definemacro|macro]] to trick the parser in thinking that you're on the same referenced [[$sequence]] or [[$animation]].}}
{{note|Keep in mind that you can only use it to point to a [[$sequence]] or [[$animation]] name. Otherwise [[Studiomdl|StudioMDL]] will throw a EXCEPTION VIOLATION.}}
{{warning|For [[$sequence|sequence]] or [[$animation|animation]] macros composed of a single line or do not use braces, it's a good pratice put double-backslash at line end to avoid a "Macro expand overflow".}}


{{warning|Keep in mind that you can only use it to point to a [[$sequence]] or [[$animation]] name. Otherwise StudioMDL will throw a EXCEPTION VIOLATION.}}
{{warning|For [[$sequence|sequence]] or [[$animation|animation]] macros composed of a single line or do not use braces, is a good pratice put double-backslash at line end to avoid a "Macro expand overflow".}}
== Syntax ==
== Syntax ==


<source lang=php>
  $continue <sequencename>
  $continue <sequencename>
</source>


== Examples ==
== Examples ==


$definemacro SpyMeleeGestureAttackIKRelease gesturename filename activityname \\
<source lang=php>
$sequence $gesturename$ { \\
$definemacro SpyMeleeGestureAttackIKRelease gesturename filename activityname \\
$filename$ \\
$sequence $gesturename$ { \\
weightlist SpymeleeRightArmBlend \\
$filename$ \\
subtract $gesturename$ 0 \\
weightlist SpymeleeRightArmBlend \\
delta \\
subtract $gesturename$ 0 \\
ikrule lhand release \\
delta \\
ikrule rhand release \\
ikrule lhand release \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
ikrule rhand release \\
  activity $activityname$ 1 \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
} \\
activity $activityname$ 1 \\
$continue $gesturename$
} \\
$continue $gesturename$
</source>
 
<source lang=php>
$definemacro SelfDeltaSequence FileName \\
$animation a_$FileName$  $FileName$ subtract a_$FileName$ 0 \\
$sequence    $FileName$ a_$FileName$ predelta \\
$continue    $FileName$ \\
 
// make a sequence named DLC1_Intro_Male_LeanUp with above macro, tell to lock both feets in position and set activity
$SelfDeltaSequence DLC1_Intro_Male_LeanUp {
iklock "rfoot" 1 0
iklock "lfoot" 1 0
activity ACT_DLCINTRO_01 -1
}


$definemacro SelfDeltaAnimation FileName \\
// edit above sequence $animation, constraining it start and end
$animation a_$FileName$  $FileName$ subtract a_$FileName$ 0 \\
$continue a_DLC1_Intro_Male_LeanUp frames 0 269
$sequence    $FileName$ a_$FileName$ predelta \\
</source>
$continue  a_$FileName$ \\


$definemacro SelfDeltaSequence FileName \\
== See also ==
$animation a_$FileName$  $FileName$ subtract a_$FileName$ 0 \\
* [[$definemacro]]
$sequence    $FileName$ a_$FileName$ predelta \\
* [[$definevariable]]
$continue    $FileName$ \\


[[Category:QC Commands|continue]]__NOTOC__
[[Category:QC Commands|continue]]__NOTOC__

Revision as of 11:39, 13 December 2022

The $continue is a QC command for insert more parameters to sequences and animations after declared, by expanding it. This somehow also allow expand macros.

Tip.pngTip:Place this immediately after a macro to trick the parser in thinking that you're on the same referenced $sequence or $animation.
Note.pngNote:Keep in mind that you can only use it to point to a $sequence or $animation name. Otherwise StudioMDL will throw a EXCEPTION VIOLATION.
Warning.pngWarning:For sequence or animation macros composed of a single line or do not use braces, it's a good pratice put double-backslash at line end to avoid a "Macro expand overflow".

Syntax

 $continue <sequencename>

Examples

$definemacro SpyMeleeGestureAttackIKRelease gesturename filename activityname \\
$sequence $gesturename$ { \\
	$filename$ \\
	weightlist SpymeleeRightArmBlend \\
	subtract $gesturename$ 0 \\
	delta \\
	ikrule lhand release \\
	ikrule rhand release \\
	iklock rfoot 1 0 iklock lfoot 1 0 \\
	activity $activityname$ 1 \\
} \\
$continue $gesturename$
$definemacro SelfDeltaSequence FileName \\
$animation a_$FileName$   $FileName$ subtract a_$FileName$ 0 \\
$sequence    $FileName$ a_$FileName$ predelta \\
$continue    $FileName$ \\

// make a sequence named DLC1_Intro_Male_LeanUp with above macro, tell to lock both feets in position and set activity
$SelfDeltaSequence DLC1_Intro_Male_LeanUp {
	iklock "rfoot" 1 0
	iklock "lfoot" 1 0
	activity ACT_DLCINTRO_01 -1
}

// edit above sequence $animation, constraining it start and end
$continue a_DLC1_Intro_Male_LeanUp frames 0 269

See also