Source SDK

Source SDK

Not enough ratings
Crear animaciones para el movimiento y las armas de un personaje. (Source 2013)
By Oitnemood
aplica para Garry's mod tanto como para crear un juego o mod en el motor source, si se le aplican los comandos necesarios para que funcionen dentro del código.
   
Award
Favorite
Favorited
Unfavorite
Tomar en cuenta primero antes de hacer las animaciones en si
Lo primero que debes hacer son las animaciones “idle” primero una para cuando el personaje va sin armas y luego las de caminar “walk” que están definidas en puntos cardinales de estados unidos, por dar un ejemplo “walkN” es caminar hacia adelante y tendrás que definir diferentes posiciones tomando en cuenta la tercera persona tradicional del source, de momento has la de caminar sin armas, luego cuando hagas la de correr no te espantes si se remplaza por la de correr, ya que en el motor source, está definido como acción de correr cuando caminas rápido sin aprietes la función de caminar despacio, por lo tanto es una animación diferente la de correr y caminar rápido con la de caminar despacio, esas están definidas como “Run” y las de caminar despacio como “walk” tomarlo muy en cuenta, que si no prestas atención, puede que te confundas, ya luego de hacerlas, ahora si proponte a hacer las de demás movimientos, que serían nadar o caminar agachado, cada una definida con un comando que lo distingue, también tienen su animación idle, para mantener la pose cuando no haces movimiento y que no se quede con la normal de idle de cuando estas en tierra, ya luego puedes hacer la de las armas, que no es muy diferente entre si hay 4 o 6 animaciones en conjunto, dependiendo de lo que quieras implementar y que tan detallado quieres que será.
Una idle como debes de adivinar
Una de disparar definida como “range”
Una de recargar definido como “reload”
Y ya como debes adivinar las de caminar, correr y bucear para definir o una de otra que tengan las animaciones de caminar normalito o otra hacer otra sección de animaciones para esas armas en específico, lo cual lo hace más largo, lo cual va a decisión de cada uno si poner que camina sin apuntar o si quieres imitar por ejemplo a resident evil y que este ahí el personaje posando con el arma, ya será levantada o una posición de apuntar como en Garry’s mod para que el personaje ande todo el tiempo así, tú decides, al fin a cabo son animaciones y no afectan la jugabilidad, solo la inmersión del juego.

el crowbar no puede compilar mas de 8000 secuencias o animaciones de comandos
¿Qué pasa si quiero hacer esto mismo para npc?
es casi lo mismo, solo cambia, que debes usar los comandos que no digan "mp"

algo importante, para sus animaciones de caminar, es que deben hacer la animación con el hueso "root" o "pelvis" hacia la dirección que van a combinar
(luego se explica la lógica de eso, solo es poner un comando, para que el personaje no se mueva de manera rara"


walkframe 26 LX LY (para las animaciones de caminar)

walkframe 18 LX LY (para las animaciones de correr)

//animación de correr de ejemplo $animation "a_RunNE" "anims\a_RunN.smd" { fps 29 loop ikrule "lfoot" footstep contact 6 fakeorigin 5.85 -1.31 0 fakerotate 0 0 0 floor 0 height 18 radius 2.5 range 16 6 9 16 target 3 ikrule "rfoot" footstep contact 16 fakeorigin 0.75 -5.83 0 fakerotate 0 0 0 floor 0 height 18 radius 2.5 range 8 16 18 8 target 2 ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 18 18 target 0 ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 18 18 target 1 walkframe 18 LX LY }

(para las animaciones de disparar deben tener el siguiente comando)

{ event 3014 1 "" }

(para las animaciones de recargar, debe tener este otro comando)

{ event 3015 60 "" }

(debería quedar algo como esto)

$sequence "reload_smg1" { "anims\reload_smg1.smd" activity "ACT_RELOAD_SMG1" 1 { event 3015 60 "" } fadein 0.2 fadeout 0.2 node "standing" fps 40 ikrule "lfoot" footstep contact 0 fakeorigin 10.62 8.78 0 fakerotate 0 0 0 floor 0 height 20 radius 2.5 range 0 0 105 105 target 3 ikrule "rfoot" footstep contact 0 fakeorigin -6.3 -11.76 0 fakerotate 0 0 0 floor 0 height 20 radius 2.5 range 0 0 105 105 target 2 ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 105 105 target 0 ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 105 105 target 1 }

también, hay otros comandos de activity que no se mencionan en esta guia, pero es mejor consultar esta pagina de valve, que no quiero alagar mucho esto.
Comandos de npc de half-life 2
includemodel o include (comandos para ordenar)
$include "es para asociarlo a otro archivo con comandos, muy bueno para las animaciones"
$includemodel "es para archivos de modelo con animaciones incluidas"

$include "move_animation.qc"

$includemodel "move_animation.mdl"
Comandos de actividad.
Los comandos más principales para animar son los de activity, los cuales sirven para definir para que lo lea el código del juego y pueda definir que tipo de movimiento o acción está realizando el personaje, algo así como si le estuviera dando una indicación para moverse

ejemplo

definidos en el código singleplayer.

  • activity "ACT_IDLE" 1

para armas, siempre usa "HL2MP"

  • activity "ACT_HL2MP_IDLE_PISTOL" 1

la animación idle es para la animación sin moverse del personaje.
La animación run es para correr
La animación idle_crouch es para la animación sin moverse del personaje agachado.
La animación walk para caminar.
La animación de gesture_range_attack o simplemente range es para atacar.
La de reload, para recargar
Y la llamada jump para saltar


aquí la lista completa de movimientos

definidos en el código de npc y el personaje de jugador sin armas
  • ACT_IDLE
  • ACT_WALK
  • ACT_RUN
  • ACT_IDLE_CROUCH
  • ACT_WALK_CROUCH
  • ACT_GESTURE_RANGE_ATTACK
  • ACT_GESTURE_RELOAD
  • ACT_JUMP

    Solo para juegos en donde lo utilicen en este formato
    • ACT_HL2MP_IDLE
    • ACT_HL2MP_WALK
    • ACT_HL2MP_RUN
    • ACT_HL2MP_IDLE_CROUCH
    • ACT_HL2MP_WALK_CROUCH
    • ACT_HL2MP_GESTURE_RANGE_ATTACK
    • ACT_HL2MP_GESTURE_RELOAD
    • ACT_HL2MP_JUMP

    ya lo demás es igual en ambos casos

    Armas (Half-life 2)

    Pistol (pistola)
    ACT_HL2MP_IDLE_PISTOL
    ACT_HL2MP_RUN_PISTOL
    ACT_HL2MP_IDLE_CROUCH_PISTOL
    ACT_HL2MP_WALK_CROUCH_PISTOL
    ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL
    ACT_HL2MP_GESTURE_RELOAD_PISTOL
    ACT_HL2MP_JUMP_PISTOL
    Sub-machine gun 1 (metralleta)
    ACT_HL2MP_IDLE_SMG1
    ACT_HL2MP_RUN_SMG1
    ACT_HL2MP_IDLE_CROUCH_SMG1
    ACT_HL2MP_WALK_CROUCH_SMG1
    ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1
    ACT_HL2MP_GESTURE_RELOAD_SMG1
    ACT_HL2MP_JUMP_SMG1
    Assault rifle 2 (rifle de asalto)
    ACT_HL2MP_IDLE_AR2
    ACT_HL2MP_RUN_AR2
    ACT_HL2MP_IDLE_CROUCH_AR2
    ACT_HL2MP_WALK_CROUCH_AR2
    ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2
    ACT_HL2MP_GESTURE_RELOAD_AR2
    ACT_HL2MP_JUMP_AR2
    Shotgun (escopeta)
    ACT_HL2MP_IDLE_SHOTGUN
    ACT_HL2MP_RUN_SHOTGUN
    ACT_HL2MP_IDLE_CROUCH_SHOTGUN
    ACT_HL2MP_WALK_CROUCH_SHOTGUN
    ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN
    ACT_HL2MP_GESTURE_RELOAD_SHOTGUN
    ACT_HL2MP_JUMP_SHOTGUN
    Rocket propelled grenade
    ACT_HL2MP_IDLE_RPG
    ACT_HL2MP_RUN_RPG
    ACT_HL2MP_IDLE_CROUCH_RPG
    ACT_HL2MP_WALK_CROUCH_RPG
    ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG
    ACT_HL2MP_GESTURE_RELOAD_RPG
    ACT_HL2MP_JUMP_RPG
    Frag grenade (Granada)
    ACT_HL2MP_IDLE_GRENADE
    ACT_HL2MP_RUN_GRENADE
    ACT_HL2MP_IDLE_CROUCH_GRENADE
    ACT_HL2MP_WALK_CROUCH_GRENADE
    ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE
    ACT_HL2MP_GESTURE_RELOAD_GRENADE
    ACT_HL2MP_JUMP_GRENADE
    Physics gun (arma de físicas)
    ACT_HL2MP_IDLE_PHYSGUN
    ACT_HL2MP_RUN_PHYSGUN
    ACT_HL2MP_IDLE_CROUCH_PHYSGUN
    ACT_HL2MP_WALK_CROUCH_PHYSGUN
    ACT_HL2MP_GESTURE_RANGE_ATTACK_PHYSGUN
    ACT_HL2MP_GESTURE_RELOAD_PHYSGUN
    ACT_HL2MP_JUMP_PHYSGUN
    Crossbow
    ACT_HL2MP_IDLE_CROSSBOW
    ACT_HL2MP_RUN_CROSSBOW
    ACT_HL2MP_IDLE_CROUCH_CROSSBOW
    ACT_HL2MP_WALK_CROUCH_CROSSBOW
    ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW
    ACT_HL2MP_GESTURE_RELOAD_CROSSBOW
    ACT_HL2MP_JUMP_CROSSBOW
    Crowbar and stunstick (palanca y porra)
    ACT_HL2MP_IDLE_MELEE
    ACT_HL2MP_RUN_MELEE
    ACT_HL2MP_IDLE_CROUCH_MELEE
    ACT_HL2MP_WALK_CROUCH_MELEE
    ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE
    ACT_HL2MP_GESTURE_RELOAD_MELEE
    ACT_HL2MP_JUMP_MELEE
    S.L.A.M.
    ACT_HL2MP_IDLE_SLAM
    ACT_HL2MP_RUN_SLAM
    ACT_HL2MP_IDLE_CROUCH_SLAM
    ACT_HL2MP_WALK_CROUCH_SLAM
    ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM
    ACT_HL2MP_GESTURE_RELOAD_SLAM
    ACT_HL2MP_JUMP_SLAM

    Aquí el link a la pagina de valve de los comandos de animaciones que usan sus juegos

    aquí las secuencias de animaciones de armas de gmod

    ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE2 (mayormente usado en katanas o armas largas)

    ACT_HL2MP_GESTURE_RANGE_ATTACK_DUEL (pistolas dobles)

    ya lo demás esta en la sección de half-life 2

    para mas información para otro tipo de animaciones aquí[wiki.facepunch.com]
separar animaciones del archivo principal del modelo (opcional)
si no te quieres liar, con tener demasiados comandos en un archivo, recomiendo hacer esto, crear un archivo extra llamado de ejemplo "animation" en formato "qc" y añadirlo al archivo principal de esta manera, recomiendo ponerlo después de donde están definidos los huesos

  • $include "animation.qc"
configuración de secuencia idle.
animación idle sin armas

  • $sequence "idle_all_01" {
  • "anims\a_idle.smd"
  • activity "ACT_HL2MP_IDLE" 2
  • fadein 0.3
  • fadeout 0.3
  • fps 30
  • loop
  • }

animación con palanca, para otra animación cambia el comando de ACT_HL2MP_IDLE_MELEE por otra, el layer aim_x y aim_y esta reservado para las animaciones de girar el arma y que la cabeza se mueva, quita los signos "//" para cuando lo hagas y que lo pueda leer al compilar, luego lo enseñare como hacer lo de mirar y apuntar, de momento confórmate con hacer bien la animación del arma y definirla en "anims\" y poner su nombre
(si no funciona bien, quita los comandos ikrules)

  • $sequence "idle_melee" {
  • "anims\idle_melee.smd"
  • activity "ACT_HL2MP_IDLE_MELEE" 1
  • fadein 0.2
  • fadeout 0.2
  • //addlayer "melee_aim_x"
  • //addlayer "melee_aim_y"
  • fps 30
  • loop
  • ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 201 201 target 0
  • ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 201 201 target 1
  • ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 201 201 target 2
  • ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 201 201 target 3
  • }

animación idle de agachado

  • $sequence "cidle" {
  • "anims\cidle.smd"
  • activity "ACT_HL2MP_IDLE_CROUCH" 1
  • fadein 0.2
  • fadeout 0.2
  • fps 22
  • loop
  • //ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 0
  • //ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 1
  • //ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 2
  • //ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 3
  • }

animación idle melee agachado

  • $sequence "cidle_melee" {
  • "anims\cidle.smd"
  • activity "ACT_HL2MP_IDLE_CROUCH_MELEE" 1
  • fadein 0.2
  • fadeout 0.2
  • //addlayer "melee_aim_x"
  • //addlayer "melee_aim_y"
  • fps 12
  • loop
  • }
secuencia de saltar
(comando para juegos de un jugador y npc)

  • $sequence "jump" {
  • "a_jump"
  • activity "ACT_JUMP" 1
  • fadein 0.2
  • fadeout 0.2
  • loop
  • fps 45
  • ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 0
  • ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 1
  • ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 2
  • ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 3
  • }

(comando para juegos online)

  • $sequence "jump" {
  • "a_jump"
  • activity "ACT_HL2MP_JUMP" 1
  • fadein 0.2
  • fadeout 0.2
  • loop
  • fps 45
  • ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 0
  • ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 1
  • ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 2
  • ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 31 31 target 3
  • }
  • [/code]

    saltar con arma, cambia el comando si no quieres el de crowbar "ACT_HL2MP_JUMP_MELEE"

    • $sequence "jump_melee" {
    • "anims\jump2.smd"
    • activity "ACT_HL2MP_JUMP_MELEE" 1
    • fadein 0.2
    • fadeout 0.2
    • fps 40
    • realtime
    • ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 26 26 target 0
    • ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 26 26 target 1
    • ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 26 26 target 2
    • ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 26 26 target 3
    • }
    animación de disparar (requiere un weightlist)
    para que no interrumpa la animación de caminar, saltar o nadar, dependiendo del caso)

    los huesos r, son mayormente los que se usan para el brazo derecho donde se sostiene el arma, si es un arma de una mano asegúrate de activar con 1 solo los del brazo r, si de armas que se sostienen con dos o pistolas dobles, activa también el l, asegúrate de crear dos para estas dos tipos de animaciones, afectara mas cuando hagas la animación de girar el brazo con las armas, de momento solo lo dejara activo para cualquier animación que le pongas, si sale un error con esto, es que algún hueso de aquí, no coincide con el tuyo de tu modelo

    • $weightlist "weights_hands_weapon" {
    • "ValveBiped.Bip01_Spine" 0
    • "ValveBiped.Bip01_Spine2" 0
    • "ValveBiped.Bip01_Spine3" 0
    • "ValveBiped.Bip01_Head1" 0
    • "ValveBiped.forward" 0
    • "R_UpperArm" 1
    • "R_Forearm" 1
    • "L_UpperArm" 1
    • "L_Forearm" 1
    • "ValveBiped.Bip01_R_Clavicle" 0
    • "ValveBiped.Bip01_R_Hand" 0
    • "ValveBiped.Anim_Attachment_RH" 1
    • "ValveBiped.Bip01_R_Finger3" 0.5
    • "ValveBiped.Bip01_R_Finger31" 0.8
    • "ValveBiped.Bip01_R_Finger32" 0.5
    • "ValveBiped.Bip01_R_Finger2" 0.5
    • "ValveBiped.Bip01_R_Finger21" 0.8
    • "ValveBiped.Bip01_R_Finger22" 0.5
    • "ValveBiped.Bip01_R_Finger1" 0.5
    • "ValveBiped.Bip01_R_Finger11" 0.8
    • "ValveBiped.Bip01_R_Finger12" 0.5
    • "ValveBiped.Bip01_R_Finger0" 0.5
    • "ValveBiped.Bip01_R_Finger01" 0.8
    • "ValveBiped.Bip01_L_Clavicle" 0
    • "ValveBiped.Bip01_L_Hand" 0
    • "ValveBiped.Anim_Attachment_LH" 0
    • "ValveBiped.Bip01_L_Finger3" 0.5
    • "ValveBiped.Bip01_L_Finger31" 0.8
    • "ValveBiped.Bip01_L_Finger32" 0.5
    • "ValveBiped.Bip01_L_Finger2" 0.5
    • "ValveBiped.Bip01_L_Finger21" 0.8
    • "ValveBiped.Bip01_L_Finger22" 0.5
    • "ValveBiped.Bip01_L_Finger1" 0.5
    • "ValveBiped.Bip01_L_Finger11" 0.8
    • "ValveBiped.Bip01_L_Finger12" 0.5
    • "ValveBiped.Bip01_L_Finger0" 0.5
    • "ValveBiped.Bip01_L_Finger01" 0.8
    • }

    secuencia para disparar, ya sabes cambia el nombre del arma para que funcione y ya.

    $sequence "range_melee_1" {
    "anims\range_melee.smd"
    activity "ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE" 1
    fadein 0.2
    fadeout 0.2
    //addlayer "melee_aim_x" //derecha eh izquierda
    //addlayer "melee_"aim_y" //arriba y abajo
    fps 35
    ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 0
    ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 1
    weightlist "weights_hands_weapon" //para limitar la animacion a solo que mueva el brazo y no interrumpa las demas animaciones
    }
    secuencia al azar
    esto es opcional, puedes añadir que ciertas secuencias tengan otras animaciones extras que se reproduzcan al azar dependiendo del numero que le pongas al final, después del comando, entre mas grande el numero tendrá mas probabilidades en salir

    en su caso, se puede aplicar muy bien con la animación de pegar con la palanca o la de saltar.

    $sequence "range_melee_1" {
    "anims\range_melee.smd"
    activity "ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE" 2
    fadein 0.2
    fadeout 0.2
    addlayer "aim_x" //derecha eh izquierda
    //addlayer "aim_y" //arriba y abajo
    fps 35
    ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 0
    ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 1
    weightlist "weights_hands_weapon" //weightlist para limitar la animacion a solo que mueva el brazo y no interrumpa las demas animaciones
    }

    $sequence "range_melee_2" {
    "anims\range_knife.smd"
    activity "ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE" 2
    fadein 0.2
    fadeout 0.2
    addlayer "aim_x" //derecha eh izquierda
    //addlayer "aim_y" //arriba y abajo
    fps 35
    ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 0
    ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 101 101 target 1
    weightlist "weights_hands_weapon"
    }
    animaciones de caminar
    tomar en cuenta los puntos cardinales para guiarte y hacer la orientación de con que orientación caminara, use los que están en inglés, dado a que así estaban los que use de base para guiarme en secuencias de animaciones, tu si quieres lo puedes cambiar por los latinos, no lo recomiendo tanto, si quieres guiarte como se coloca esto y su orden.




    $animation "a_WalkC" "anims\a_WalkC.smd" { fps 20 loop } $animation "a_WalkS" "anims\a_WalkS.smd" { fps 20 loop walkframe 28 LX LY } $animation "a_WalkSE" "anims\a_WalkSE.smd" { fps 20 loop walkframe 28 LX LY } $animation "a_WalkE" "anims\a_WalkE.smd" { fps 20 loop walkframe 26 LX LY } $animation "a_WalkNE" "anims\a_WalkNE.smd" { fps 20 loop walkframe 26 LX LY } $animation "a_WalkN" "anims\a_WalkN.smd" { fps 20 loop walkframe 20 LX LY } $animation "a_WalkNW" "anims\a_WalkNW.smd" { fps 20 loop walkframe 26 LX LY } $animation "a_WalkW" "anims\a_WalkW.smd" { fps 20 loop walkframe 26 LX LY } $animation "a_WalkSW" "anims\a_WalkSW.smd" { fps 20 loop }

    secuencia de caminar (para un mod o juego singleplayer)

    $sequence "walk_all" { "a_WalkS" "a_WalkSE" "a_WalkE" "a_WalkNE" "a_WalkN" "a_WalkNW" "a_WalkW" "a_WalkSW" "a_WalkS" activity "ACT_WALK" 1 blend "move_yaw" -180 180 blendwidth 9 fadein 0.2 fadeout 0.2 fps 20 loop }


    secuencia de caminar (sin armas y para npc)

    $sequence "walk_all" { "a_WalkN" "a_WalkSE" "a_WalkE" "a_WalkNE" "anims\a_WalkC.smd" "a_WalkNW" "a_WalkW" "a_WalkSW" "a_WalkS" activity "ACT_HL2MP_WALK" 1 blend "move_y" -1 1 blend "move_x" -1 1 fadein 0.2 fadeout 0.2 fps 20 loop }


    secuencia de caminar (para usarlo con armas)

    $sequence "walk_melee" { "a_WalkSW" "a_WalkS" "a_WalkSE" "a_WalkW" "anims\a_WalkC.smd" "a_WalkE" "a_WalkNW" "a_WalkN" "a_WalkNE" activity "ACT_HL2MP_WALK_MELEE" 1 blend "move_y" -1 1 blend "move_x" -1 1 fadein 0.2 fadeout 0.2 fps 10 loop }
    Crear animaciones de voltear la cabeza o el torso
    Bueno esto lo explicare en otra guía que no quiero alargar mucho esto, solo lo resumiré aquí, que debes crear animaciones del personaje con diferentes posturas de la cabeza o el torso, si te gusta este formato.
    aquí el link

    ¿lo quieres hacer con el brazo del personaje? aquí esta la guía
    apuntar con arma - guía
    ¿animaciones de nadar y caminar agachado?
    eso se configura de manera similar a lo de caminar, así que no hace falta explicar nada mas aquí, solo copia el siguiente comando y si es de un arma, cámbiaselo y ya.

    • //animaciones de nadar

    • $animation "a_SwimS" "anims\a_SwimS.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimSE" "anims\a_SwimSE.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimE" "anims\a_SwimE.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimNE" "anims\a_SwimNE.smd" {
    • fps 50
    • loop
    • //ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 60 60 target 0
    • //ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 60 60 target 1
    • //ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 60 60 target 2
    • //ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 60 60 target 3
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimN" "anims\a_SwimN.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimNW" "anims\a_SwimNW.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimW" "anims\a_SwimW.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • $animation "a_SwimSW" "anims\a_SwimSW.smd" {
    • fps 50
    • loop
    • walkframe 60 LX LY
    • }

    • //secuencia de nadar, si se quiere usar con armas, usa "HL2MP" y no olvides el nombre del arma al final

    • $sequence "swimming_all" {
    • "a_SwimSW"
    • "a_SwimS"
    • "a_SwimSE"
    • "a_SwimW"
    • "anims\swimming_all.smd"
    • "a_SwimE"
    • "a_SwimNW"
    • "a_SwimN"
    • "a_SwimNE"
    • activity "ACT_SWIM" 1
    • blend "move_y" -1 1
    • blend "move_x" -1 1
    • fadein 0.4
    • fadeout 0.4
    • node "swimming"
    • loop
    • }

    • //animaciones de agacharse

    • $animation "a_Crouch_walkS" "anims\a_Crouch_walkS.smd" {
    • fps 10
    • loop
    • }

    • $animation "a_Crouch_walkSE" "anims\a_Crouch_walkSE.smd" {
    • fps 10
    • loop
    • }

    • $animation "a_Crouch_walkE" "anims\a_Crouch_walkE.smd" {
    • fps 10
    • loop
    • }

    • $animation "a_Crouch_walkNE" "anims\a_Crouch_walkNE.smd" {
    • fps 10
    • loop
    • }

    • $animation "a_Crouch_walkN" "anims\a_Crouch_walkN.smd" {
    • fps 8
    • loop
    • }

    • $animation "a_Crouch_walkNW" "anims\a_Crouch_walkNW.smd" {
    • fps 10
    • loop
    • }

    • $animation "a_Crouch_walkW" "anims\a_Crouch_walkW.smd" {
    • fps 10
    • loop
    • }

    • $animation "a_Crouch_walkSW" "anims\a_Crouch_walkSW.smd" {
    • fps 10
    • loop
    • }

    • //secuencia de caminar agachado con armas, debe tener "HL2MP"

    • $sequence "cwalk" {
    • "a_Crouch_walkN"
    • "a_Crouch_walkSE"
    • "a_Crouch_walkE"
    • "a_Crouch_walkNE"
    • "anims\cwalk.smd"
    • "a_Crouch_walkNW"
    • "a_Crouch_walkW"
    • "a_Crouch_walkSW"
    • "a_Crouch_walkS"
    • activity "ACT_HL2MP_WALK_CROUCH_PISTOL" 1
    • blend "move_y" -1 1
    • blend "move_x" -1 1
    • fadein 0.2
    • fadeout 0.2
    • fps 10
    • loop
    • walkframe 60 LX LY
    • }

    (aqui la secuencia de caminar agachado, para npc y el personaje del jugador sin armas, aunque también se puede incluir para las armas, si se incluye el "hl2MP")

    $sequence "cwalk" { "a_Crouch_walkS" "a_Crouch_walkSE" "a_Crouch_walkNE" "a_Crouch_walkN" "a_Crouch_walkE" "a_Crouch_walkNW" "a_Crouch_walkW" "a_Crouch_walkSW" "a_Crouch_walkS" activity "ACT_WALK_CROUCH" 1 blend "move_yaw" -180 180 blendwidth 9 fadein 0.2 fadeout 0.2 fps 10 loop walkframe 60 LX LY }
    errores
    si tienes errores, es que los ikrules, no son compatibles con tu modelo y sus huesos.
    que una animación no la hiciste y te sale error por eso o por no poner bien su nombre.
    y por último que salga una animación errónea, porque el motor source está programado para usar una al azar si este no tiene ninguna, ejemplo la de correr despacio y rápido, pueden usar la de caminar si no se define estas animaciones