home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / anim / crouch_run.scr < prev    next >
Encoding:
Text File  |  2002-10-21  |  1.8 KB  |  77 lines

  1. //------------
  2. // Crouch_run
  3. //------------
  4. // Run while crouched.  Used to be called run_hunch.scr.  Makes sure that the character 
  5. // is crouching first, and then makes him run.
  6.  
  7. //println "Entering crouch_run.scr"
  8.  
  9. //=================================================
  10. //=================================================
  11. start:
  12.  
  13.     waitexec anim/default_inithandler.scr
  14.     waitexec anim/smoking.scr::SmokeRemoveCigarette
  15.  
  16.     //make sure we are crouching...
  17.     // If you're crouching, just start crouch-running.  If you're walking or running, don't 
  18.     // bother stopping in order to crouch down, just crouch while you continue to move.
  19.     waitexec anim/crouch.scr::transition
  20.  
  21.     self.position = crouchrun
  22.     
  23.     while (1)
  24.     {
  25.         self.blendtime = 0.30
  26.  
  27.         switch (self.weapongroup)
  28.         {
  29.             pistol:
  30.             rifle:
  31.             mp40:
  32.             mp44:
  33.             bar:
  34.             thompson:
  35.             unarmed:
  36.             bazooka:
  37.                 if (self.ground == water)
  38.                 {
  39.                     self setmotionanim run_rifle_water
  40.                     self waittill flaggedanimdone
  41.                 }
  42.                 else if (self.ground == beach)
  43.                 {
  44.                     self setmotionanim run_rifle_gundown_beach
  45.                     self waittill flaggedanimdone
  46.                 }
  47.                 else
  48.                 {
  49.                     if (self.movedir != (0 0 0))
  50.                     {
  51.                         //println "Crouchrun.scr using motion blend with movedir: " self.movedir
  52.                         waitexec anim/motionblend.scr::PlayAnim (self.weapongroup + "_crouchrun_")
  53.                     }
  54.                     else
  55.                     {
  56.                         //println "Crouchrun.scr with **NO** motion blend"
  57.                         self setmotionanim (self.weapongroup + "_crouchrun_forward")
  58.                         self waittill flaggedanimdone
  59.                     }
  60.                 }
  61.  
  62.                 break
  63.                 
  64.             default:
  65.                 println "CrouchRun default case for " self.weapongroup " weapongroup - fix Crouchrun.scr"
  66.                 self setmotionanim rifle_crouchrun_forward
  67.                 self waittill flaggedanimdone
  68.                 break
  69.         }
  70.     }
  71. end
  72.  
  73.  
  74.  
  75.  
  76.  
  77.