How to make a prop_dynamic animation

Entity Report

L2: Junior Member
Oct 1, 2020
56
16
Recently, I have been making models to use in my maps. I want to make a dynamic prop with animations, but don't know how. Are there any good resources available on this?
 

Cyberen

L3: Member
Mar 30, 2021
143
30
Check out the hammer page on animations, but I'll make it easier by sharing what I did.

0. Download Blender Source Tools and get used to making models that way. There's videos on it.
1. Made a model with a simple skeleton in Blender
2. Open the animation view in Blender so I see the timeline on the bottom
3. Change the view from Dope Sheet to Action Editor
4. In this view, click "new" to create a new animation. Name it something (but always have an idle animation that's just still)
5. With the new action, make the skeleton move.
6. Now it comes time to export the model and animations. Start with exporting the collection the model is in to just export the model. Then export each animation by highlighting it in the action editor. It'll usually be named "anims/move.smd" where "move" is the animation.
7. Remember to make an idle animation for reference!
8. For animations that involve moving the bone independent of its parent, use .dmx as the file format.
9. Bones can't shrink or grow, that's for vertex animation (which I don't know what to do yet)
10. Make a QC file with the animations listed like

Code:
$sequence "idle" {
    "anims/idle.smd"
    fadein 0.2
    fadeout 0.2
    fps 1
}
$sequence "snail" {
    "anims/snail.smd"
    fadein 0.2
    fadeout 0.2
    fps 1
}
$sequence "slow" {
    "anims/slow.smd"
    fadein 0.2
    fadeout 0.2
    fps 1
}

there's a lot more specific stuff you can use for the QC file in the Hammer Animation pages.

You can also use the "loop" command if the animation loops so there isn't a weird pause at the ending of an animation. Decompile a model with animation with crowbar if you want to reverse-engineer it.