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

  1. // in level script- self.enemy = $player to set an aim target
  2.  
  3.  
  4. //=================================================
  5. //=================================================
  6. start:
  7.     waitexec anim/default_inithandler.scr
  8.     waitexec anim/smoking.scr::SmokeRemoveCigarette
  9.     self weaponcommand mainhand attachtohand mainhand
  10.     self.inreload = 0
  11.  
  12.  
  13. //    self attackplayer
  14. //    self.blendtime = 0.30
  15. //    self setmotionanim (self.weapongroup + "_run_forward")
  16. //    println self.enemy
  17.  
  18.     
  19.     if (self.weapongroup == bazooka)
  20.     {
  21.         self.shootpct = 0
  22.     }
  23.     else
  24.     {
  25.         self.shootpct = 50
  26.     }
  27.     
  28.         
  29.     switch (self.weapongroup)
  30.     {
  31.         pistol:
  32.         rifle:
  33.         mp40:
  34.         mp44:
  35.         bar:
  36.         thompson:
  37.         unarmed:
  38.         bazooka:
  39.             switch (self.position)
  40.             {
  41.                 prone:
  42.                 pronewalk:
  43.                     waitexec anim/crouch.scr::transition
  44.                     // Deliberately fall through to crouched running now that we're crouched.
  45.                 crouch:
  46.                 crouchwalk:
  47.                 crouchrun:
  48.                     if (self.forceReload == 1)
  49.                     {
  50.                         waitexec anim/stand.scr::transition
  51.                     }
  52.                     else
  53.                     {
  54.                         self.position = crouchrun
  55.                         thread CrouchRunThread
  56.                         local.crouchthread = parm.previousthread
  57.                         local.crouchthread end
  58.                     }
  59.                     // Deliberately fall through to regular running.
  60.                 default:
  61.                     self.position = run
  62.                     waitexec anim/motionblend.scr::Start (self.weapongroup + "_run_") 1 self.shootpct
  63.                     break
  64.             }
  65.             break
  66.         
  67.         default:
  68.             println "Runto_inopen default case for " self.weapongroup " weapongroup - fix runto_inopen.scr"
  69.             while (1)
  70.             {
  71.                 self.position = run
  72.                 self.blendtime = 0.30
  73.                 self setmotionanim rifle_run_forward
  74.                 self waittill flaggedanimdone
  75.             }
  76.             break
  77.     }
  78. end
  79.  
  80.  
  81. //===============
  82. // CrouchRunThread
  83. CrouchRunThread:
  84.     waitexec anim/motionblend.scr::Start (self.weapongroup + "_crouchrun_") 1 self.shootpct
  85.     println "runto_inopen.scr: AAAARGH! crouchrun thread ended! BUGBUGBUG!"
  86. end