Garry's Mod Wiki

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.

GitHub repository

The entirety of the animation sources are available on this GitHub repo.

For creators

Playermodels

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!

Animators

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

List of activities

Check the ACT enum.

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)

Aimlayers

Also known as aim matrices or hold types.

  • ar2
  • camera
  • crossbow
  • duel (dual pistols)
  • fist
  • grenade
  • gravgun
  • knife
  • melee
  • 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)
  • rpg
  • shotgun
  • slam
  • smg

Showoff

There are several idle poses available to addon / gamemode creators under these activities.

  • ACT_GMOD_SHOWOFF_STAND_***
  • ACT_GMOD_SHOWOFF_DUCK_***

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 & gestures

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_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_PERSISTENCE (wip, unused)
  • ACT_GMOD_TAUNT_ZOMBIE (zombie tantrum)
  • 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")
  • ACT_GMOD_GESTURE_ITEM_DROP
  • ACT_GMOD_GESTURE_ITEM_GIVE
  • ACT_GMOD_GESTURE_ITEM_PLACE
  • ACT_GMOD_GESTURE_ITEM_THROW

The above are usually accessible by any player by using the "act" command, e.g.

act salute

— unless the gamemode restricts it.

Gmod will, by default, switch to a taunt cam while playing these.

Other

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_DEATH links to death animations (think TF2-style). The actual code implementation is up to you.

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.