$boneflexdriver: Difference between revisions
Jump to navigation
Jump to search
Note:Bone flex drivers will only work in-game in Alien Swarm and further. In earlier games, they will never simulated in-game as the code is never called, but it will only be simulated in HLMV. To fix this in a mod, run the
(Verified availability) |
(Document for Source 2013) |
||
Line 3: | Line 3: | ||
This command is available in the [[Source 2013]] branch and further. | This command is available in the [[Source 2013]] branch and further. | ||
{{ | {{note|Bone flex drivers will only work in-game in [[Alien Swarm]] and further. In earlier games, they will never simulated in-game as the code is never called, but it will only be simulated in HLMV. To fix this in a mod, run the <code>Studio_RunBoneFlexDrivers</code> function on the client when building transformations.}} | ||
== Syntax == | == Syntax == | ||
Source 2013: | |||
<syntaxhighlight lang=php> | |||
$boneflexdriver <bone_name> <graph_axis> <flex_name> <min> <max> | |||
</syntaxhighlight> | |||
Alien Swarm and later: | |||
<syntaxhighlight lang=php> | <syntaxhighlight lang=php> | ||
$boneflexdriver <bone_name> <graph_axis> <flex_name> <start_offset> <time_factor> | $boneflexdriver <bone_name> <graph_axis> <flex_name> <start_offset> <time_factor> | ||
Line 26: | Line 31: | ||
:* <code>multi_<vca_name></code> (for ty) | :* <code>multi_<vca_name></code> (for ty) | ||
: In both cases, <code><vca_name></code> is the name of the model's [[vcafile]] minus any file extension. | : In both cases, <code><vca_name></code> is the name of the model's [[vcafile]] minus any file extension. | ||
; min | |||
: Minimum weight value of the controller. | |||
; max | |||
: Maximum weight value of the controller. | |||
; start_offset | ; start_offset | ||
: Adds a delay before the vertex animation starts. | : Adds a delay before the vertex animation starts. |
Revision as of 12:28, 25 May 2021
$boneflexdriver is a QC command which enables driving a flex with a bone's animation. This is particularly useful in multiplayer games where you can't pack VDC files into the map, as you can still use flex animation. It is also critical to vertex animation.
This command is available in the Source 2013 branch and further.

Studio_RunBoneFlexDrivers
function on the client when building transformations.Syntax
Source 2013:
$boneflexdriver <bone_name> <graph_axis> <flex_name> <min> <max>
Alien Swarm and later:
$boneflexdriver <bone_name> <graph_axis> <flex_name> <start_offset> <time_factor>
- bone_name
- The name of an existing bone that will host vertex animation for this model.
- graph_axis
- One of three values:
tx
- Links the target flex controller to the weight of the animation (much like a skeletal animation's). Controlled by the X-axis animation of the host bone.
ty
- Links the target flex controller to the current frame of vertex animation. Controlled by the Y-axis animation of the host bone.
tz
- Unknown function.
- flex_name
- The name of the flex controller this command operates on. There are two sensible options:
<vca_name>
(for tx)multi_<vca_name>
(for ty)
- In both cases,
<vca_name>
is the name of the model's vcafile minus any file extension. - min
- Minimum weight value of the controller.
- max
- Maximum weight value of the controller.
- start_offset
- Adds a delay before the vertex animation starts.
- time_factor
- The keyframe rate of the animation is multiplied by this value. It doesn't actually change the animation's duration however, making it of little use.
Example
For vertex animation:
$boneflexdriver "flexAnimBone" tx "my_vca_name" 0 1
$boneflexdriver "flexAnimBone" ty "multi_my_vca_name" 0 1