Gesture Animations

From Valve Developer Community
Revision as of 10:48, 5 May 2007 by ChromeAngel (talk | contribs) (creating a gesture activity)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

After struggling to create attack gesture activities that didn't completely seize control of the model and studying the .QC commands list this technique was developed. After making an animation "attack.smd" containing the animation including lines like the following in the models QC file:


$animation a_attack "attack"

$animation b_attack "attack" subtract a_attack 0

$sequence weapon_attack "b_attack" activity ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1 1 fps 60 delta


Subtracting frame 0 of the attack animation from the rest of the animation then using it as a "delta" type sequence seems to do the job, "attack" can now be overlaid over other similar animations like idling, crouching and running.