$controller
$controller
is a QC command available in all Source games. It creates a channel to manually set a single axis position or angle on a bone through game code. Not recommended for use, as this functionality was succeeded by $poseparameter and $sequence.
Warning:You can't assign more than 6 controllers to a single bone.
Syntax
$controller <number> "<bone_name>" [L]<axis>[R] <start> <end>
where
- <number>
- The number of the controller (you may need multiple controllers). 0-3 for custom controller, 4 or "mouth" for jaw (GoldSrc only).
- <bone_name>
- The name of the bone to control.
- <L>
- The prefix 'L' specifies that the controller is to loop the bone movement from the <end> to the <start>. Warning:GoldSrc only.
- <axis>
- The axis can be either X, Y, or Z. You need to specify a new controller for each axis of movement/rotation.
- [R]
- The suffix 'R' specifies that the bone is to be rotated from <start> degrees to <end> degrees. Not including 'R' simply moves the bone along the <axis> from <start> world units to <end> world units.
- <start>
- Starting value of the controller.
- <end>
- End value of the controller.
Example
$modelname "WScanner_Single.mdl" $model "WScanner" "WScanner_Single_Waste_Scanner_Reference.smd" $cdmaterials "models\obsolete\waste_scanner\" //This controller rotates the root bone from 0 to 360 degrees. $controller 0 "Dummy (Root)" ZR 0 360 //Controller 1 has two entries to allow for the bone to travel 17 units in the X(-Z) direction. //$controller lines can only have one direction specified, so this allows for blending the movement. //move the antenna base bone from 0 to 17 units in the X direction. $controller 1 "Antenna Base" X 0 17 //move the antenna base bone from 0 to -17 units in the Z direction. $controller 1 "Antenna Base" Z 0 -17