Player model animations have been largely enhanced in Garry's Mod 13 (update 143). The movement system was switched to 9-way (used in Team Fortress 2), current sequences were polished/tweaked, IK rules added, and last but not least, new animations were added, which gamemodes can use for added eyecandy!
Keep in mind that this effectively segregates NPC models and playermodels, as the former use 8-way. This makes most of the Half-Life 2 NPC animations incompatible with the player animation system.
The entirety of the animation sources are available on this GitHub repo.
The skeleton used is the standard HL2 ValveBiped. It can be either Valve's male or female variants.
Playermodel creators should include the following in their QCs:
Make sure that your model's QC does not have any sequences that are tied to activities (including ACT_IDLE), or they may override the actual animations. As for making playermodels, the Valve Developer Wiki covers this already; nevertheless, here are helpful .QCI includes!
A QC source set is available here.
It contains examples for all movement types. You can then use this in your own player models (it is technically impossible at the moment to add onto the existing animations, sadly).
Check the Enums/ACT.
ACT_HL2MP_IDLE_CROUCH_***(standing still while crouched)
ACT_HL2MP_WALK_CROUCH_***(walking while crouched)
ACT_HL2MP_SWIM_IDLE_***(swimming, not moving)
ACT_HL2MP_RUN(running without any weapons; resembles jogging, especially for the girls.)
ACT_HL2MP_RUN_FAST(equivalent to sprinting; looks a lot more like running, as if it were for a race)
ACT_HL2MP_RUN_CHARGING(left forearm forwards; similar to L4D2's charger in nature.)
ACT_HL2MP_RUN_PANICKED(arms in non-standard positions)
ACT_HL2MP_RUN_PROTECTED(left arm used to cover head)
Also known as aim matrices or hold types.
melee2(two-handed melee weapons)
passive(not aiming in front)
pistol(one-handed small firearms, some knockback on attack anim)
revolver(two-handed small firearms, heavier knockback on attack anim)
There are several idle poses available to addon / gamemode creators under these activities.
They were done with "showing off / posing next to something you built, for a picture" in mind — though you can of course use them for whatever else.
Taunts are animations which were done with "no items held by the model" in mind. As such, weapons should be hidden while these activities play.
ACT_GMOD_TAUNT_LAUGH(also self explanatory)
ACT_GMOD_TAUNT_MUSCLE(long "sexy" dance)
ACT_GMOD_GESTURE_BECON(waving to say "come on")
ACT_GMOD_GESTURE_DISAGREE(waving the finger to say "no")
ACT_GMOD_GESTURE_SALUTE(slightly silly military-style salute)
ACT_GMOD_GESTURE_WAVE(waving to say "hello")
The above are usually accessible by any player by using the "act" command, e.g.
— unless the gamemode restricts it.
Gmod will, by default, switch to a taunt cam while playing these.
ACT_LANDlinks to a delta sequence that adds recoil to the player when landing from a jump.
ACT_GMOD_IN_CHATwill put the player's left hand to his ear. This is used when typing.
ACT_GMOD_DEATHlinks to death animations (think TF2-style). The actual code implementation is up to you.
- 9-way: two pose parameters, move_x and move_y, control the direction and "intensity" of the movement.
- 8-way: a single pose parameter, move_yaw, controls the angle of the movement.
The main difference is that 9-way allows for smooth transitions between idle and its closest movement states. The player animations were switched to 9-way for Gmod 13; Half-Life 2's NPCs, however, are still 8-way.