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

  1. start:
  2.     //println "Running runto_danger.scr with move dir " self.movedir
  3.     waitexec anim/default_inithandler.scr
  4.     waitexec anim/smoking.scr::SmokeRemoveCigarette
  5.     self weaponcommand mainhand attachtohand mainhand
  6.  
  7.     waitexec anim/stand.scr::transition
  8.  
  9.     self.position = run
  10.     
  11.     while (1)
  12.     {
  13.         self.blendtime = 0.30
  14.  
  15.         switch (self.weapongroup)
  16.         {
  17.             pistol:
  18.             rifle:
  19.             mp40:
  20.             mp44:
  21.             bar:
  22.             thompson:
  23.             unarmed:
  24.             bazooka:
  25.                 if (self.movedir != (0 0 0))
  26.                 {
  27.                     //println "Runto_danger.scr using motion blend with movedir: " self.movedir
  28.                     waitexec anim/motionblend.scr::PlayAnim (self.weapongroup + "_crouchrun_")
  29.                 }
  30.                 else
  31.                 {
  32.                     //println "Runto_danger.scr with **NO** motion blend"
  33.                     self setmotionanim (self.weapongroup + "_crouchrun_forward")
  34.                     self waittill flaggedanimdone
  35.                 }
  36.                 break
  37.                 
  38.             default:
  39.                 println "Runto_danger default case for " self.weapongroup " weapongroup - fix runto_danger.scr"
  40.                 self setmotionanim rifle_crouchrun_forward
  41.                 self waittill flaggedanimdone
  42.                 break
  43.         }
  44.     }
  45. end
  46.