Advertisement
Sciolyte

WAI Example

Nov 19th, 2015
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.82 KB | None | 0 0
  1. $texturepath "models/player/soldier/"
  2. $mesh soldier soldier.smd
  3. $modelname soldier
  4. $origin 9 29 -18
  5. $collisionmesh ragdoll ragdoll.smd
  6. $mass 150
  7. $scale 20
  8. //$static 1 // Use if mesh isn't animated and doesn't have any bones or bone weights
  9.  
  10. $attachment "weapon" "b_Root_Weapon" 0 0 0 180 0 0
  11. $attachment "grenade" "b_Root_Grenade" 0 0 0 0 0 0
  12.  
  13. $define ANIM_SPEED 30
  14.  
  15. $define ACT_SMG_RELOAD 12531
  16.  
  17. $animation "smg_reload" "animations_smg/reload" fps ANIM_SPEED ACT_SMG_RELOAD 1
  18. $animation "crouch_idle" "crouch_idle" fps ANIM_SPEED loop
  19. $animation "crouch_walk" "crouch_walk" fps ANIM_SPEED loop
  20. $animation "fire" "fire" fps ANIM_SPEED
  21. $animation "idle" "idle" fps ANIM_SPEED loop ACT_IDLE 1
  22. $animation "idle_stance" "idle_stance" fps ANIM_SPEED loop
  23. $animation "jump" "jump" fps ANIM_SPEED ACT_JUMP 1
  24. $animation "knockedback" "knockedback" fps ANIM_SPEED
  25. $animation "melee" "melee" fps ANIM_SPEED ACT_MELEE_ATTACK1 1
  26. $animation "reload" "reload" fps ANIM_SPEED
  27. $animation "run2" "run2" fps ANIM_SPEED loop
  28.  
  29. $animation "walk_look" "walk_look" fps ANIM_SPEED
  30.  
  31. $attachment "lfoot" "Bind_LeftFoot" 0 -0.172 0
  32. $attachment "rfoot" "Bind_RightFoot" 0 -0.172 0
  33.  
  34. $blendcontroller move_yaw 0 360 loop // Custom range. If not defined, use range set through animation (0 - 360)
  35. $blendcontroller aim_yaw -45 45
  36. $blendcontroller aim_pitch -45 45
  37.  
  38. $animation "aim_down" "aim_down_45" fps ANIM_SPEED loop subtract idle
  39. $animation "aim_up" "aim_up_45" fps ANIM_SPEED loop subtract idle
  40. $animation "aim_left" "aim_left_45" fps ANIM_SPEED loop subtract idle
  41. $animation "aim_right" "aim_right_45" fps ANIM_SPEED loop subtract idle
  42. $animation "aim_yaw" "idle" subtract "idle" range 0 0 autoplay blendcontroller aim_yaw -45 45 3 "aim_left" -45 "aim_yaw" 0 "aim_right" 45
  43. $animation "aim_pitch" "idle" subtract "idle" range 0 0 autoplay blendcontroller aim_pitch -45 45 3 "aim_up" 45 "aim_pitch" 0 "aim_down" -45
  44.  
  45. $animation "walk_right" "walk_right" fps ANIM_SPEED loop
  46. $animation "walk_back" "walk_back" fps ANIM_SPEED loop
  47. $animation "walk" "walk" fps ANIM_SPEED loop ACT_WALK 1 blendcontroller move_yaw 0 360 2 "walk_right" 90 "walk_back" 180 {
  48.     $event AE_FOOTSTEP_LEFT 2
  49.     $event AE_FOOTSTEP_RIGHT 12
  50. }
  51.  
  52. $blendcontroller bc_test -45 45
  53. $animation "blend_test_ref" "blend_test_ref" loop
  54. $animation "blend_test_larm" "blend_test_larm" loop subtract blend_test_ref
  55. $animation "blend_test_rarm" "blend_test_rarm" loop subtract blend_test_ref
  56. $animation "blend_test" "blend_test_ref" loop subtract blend_test_ref range 0 0 autoplay blendcontroller bc_test -45 45 2 "blend_test_larm" -45 "blend_test_rarm" 45
  57.  
  58.  
  59. $animation "run" "run" fps ANIM_SPEED loop ACT_RUN 1 blendcontroller move_yaw 0 360 4 "run" 0 "walk_right" 90 "walk_back" 180 "run" 360 {
  60.     $event AE_FOOTSTEP_LEFT 2
  61.     $event AE_FOOTSTEP_RIGHT 12
  62. }
  63.  
  64. $removebone "U3DRoot"
  65. $removebone "SceneRoot"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement