Creating custom NPC models, movement through world

Hello folks, I’ve been trying to figure this out for a few hours but nothing seems to give. I’ve created a custom model with a walk animation in Blender then compiled it to source engine. The model appears correct, I have 2 animations titled ACT_IDLE and ACT_WALK, and when it’s time for the NPC to walk somewhere the animation plays however the NPC moves EXTREMELY slow. At first I didn’t think it was moving at all, until I minimized the game and checked back 5 minutes later the NPC had reached its destination.

I’m curious if anybody here has an idea on what I need to do to fix the movement speed for my models. Here’s what I have in my .qc. All movement directions are set to the same sequence, I haven’t gotten that far with the animations yet =\


$modelname ZombieMale01.mdl
$cdmaterials "models\Sombiez\Infected"

$scale 0.4
$surfaceprop "flesh"
$body mybody "ZombieMale01.smd"
$sequence Idle01 "ZombieMale01" loop ACT_IDLE 1 fps 1

$animation move_NW "anims/walk.smd" loop fps 30  walkframe 68 LX LY
$animation move_N  "anims/walk.smd"  loop fps 30  walkframe 68 LX
$animation move_NE "anims/walk.smd" loop fps 30  walkframe 68 LX LY
$animation move_E  "anims/walk.smd"  loop fps 30  walkframe 68 LY
$animation move_SE "anims/walk.smd" loop fps 30  walkframe 68 LX LY
$animation move_S  "anims/walk.smd"  loop fps 30  walkframe 68 LX
$animation move_SW "anims/walk.smd" loop fps 30  walkframe 68 LX LY
$animation move_W  "anims/walk.smd"  loop fps 30  walkframe 68 LY
$animation move_C "anims/walk.smd" loop fps 30  walkframe 68 LY

$sequence walk {
	move_SW move_S move_SE
	move_W  move_C move_E
	move_NW move_N move_NE
	
	blendwidth 3
	blend move_y -1 1
	blend move_x -1 1
	
	activity ACT_WALK 1
}

I don’t know much of modeling or animating; that forum is here: http://facepunch.com/forumdisplay.php?f=40

But, there should be a model that you compile your model with. It will contain all of the normal animations ( you need to rig the skeleton and compile the animations model in with your model by adding something to the QC file )

They should be under models/ as z_anm.mdl, stalker_animations.mdl, police_animations.mdl, f_anm.mdl, combine_soldier_anims.mdl, m_anm.mdl and possibly others ( select one ).

I think what you mean is decompiling an already made model and replacing the mesh with my model’s mesh so it has the same skeleton and is able to run the same animations, though I’m trying to build a new model with new animations from the ground up. I’m no modeler/animator either, but after discovering this:

I think I should be able to manually code my NPCs and specify how the animations and movement work, rather then trying to fudge them into Source Engine’s stuff. Seems like a much better approach :slight_smile: