Player animations

From GMod wiki
Jump to: navigation, search


Player Animations

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.

For creators


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:

  • m_anm.mdl (men)
  • f_anm.mdl (women)
  • z_anm.mdl (zombies)

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. Lua implementation to "mount" those animations might come in a future update. (it is possible to do this directly with QC commands, but you would be unable to overwrite the animations once they have been downloaded)

List of activities

Go to ACT_ Enums for the enums.

Movement types

  • ACT_HL2MP_IDLE_*** (standing still)
  • ACT_HL2MP_SIT_*** (sitting)
  • ACT_HL2MP_WALK_*** (walking)
  • ACT_HL2MP_RUN_*** (running)
  • ACT_HL2MP_JUMP_*** (jumping)
  • ACT_HL2MP_IDLE_CROUCH_*** (standing still while crouched)
  • ACT_HL2MP_WALK_CROUCH_*** (walking while crouched)
  • ACT_HL2MP_SWIM_IDLE_*** (swimming, not moving)
  • ACT_HL2MP_SWIM_*** (swimming, moving)

Special movement activities

  • 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.

  • ar2
  • camera
  • crossbow
  • duel (dual pistols)
  • fist
  • grenade
  • knife
  • melee
  • melee2 (two-handed melee weapons)
  • passive (not aiming in front)
  • pistol (one-handed small firearms, some knockback on attack anim)
  • physgun
  • revolver (two-handed small firearms, heavier knockback on attack anim)
  • rpg
  • shotgun
  • slam
  • smg


These animations involve mostly the left hand; as such, there is no need to hide weapons (unless it's duel?)

  • ACT_GMOD_GESTURE_AGREE (thumbs up)
  • 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 theorically accessible by any player by using the "act" command, e.g. act salute.


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. You should also freeze the player in place and use a thirdperson camera, just like in TF2!

  • ACT_GMOD_TAUNT_CHEER ("hell yeah")
  • ACT_GMOD_TAUNT_LAUGH (self explanatory)
  • ACT_GMOD_TAUNT_LAUGH (also self explanatory)
  • ACT_GMOD_TAUNT_MUSCLE (long "sexy" dance)
  • ACT_GMOD_TAUNT_ZOMBIE (zombie tantrum)


Multiplayer-oriented activities

  • ACT_LAND links to a delta sequence that adds recoil to the player when landing from a jump.
  • ACT_GMOD_IN_CHAT will put the player's left hand to his ear. This is used when typing.
  • ACT_GMOD_GESTURE_MELEE_SHOVE_2HAND (or 1HAND) are, as the name suggest, shoving animations, L4D-style.

Miscellaneous sequences

  • ACT_GMOD_DEATH links to death animations (think TF2-style). The actual code implementation is up to you.

Technical notes

The playermodel skeletons are the standard HL2 ValveBiped ones. However, we don't actually bother with separate animation sets; the female playermodels re-use almost completely the male set, with $lockbonelengths enabled to avoid deformations. This may result in some situations where an arm/leg will be completely straight on female playermodels whereas it was still slightly bended on the male animation set, since the ladies are shorter by a few units. Gestures are now entirely additive on the pelvis, too!

9-way and 8-way

  • 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.

Misc. notes

  • The zombie set of anims has five different walks!
  • The "panicked" runs have three variations for the guys, two for the gals.

Known issues

  • Swimming animations have a somewhat shabby implementation of aimlayers for now.
  • Despite switching over to 9-way, blending from walk to idle is not entirely seamless.
Personal tools