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

  1. //-----
  2. // Runto_casual
  3. //-----
  4. // Basic run, without trying to duck or dive or shoot or anything like that.  It also makes sure you're standing up first.
  5.  
  6. //println "runto_casual.scr"
  7.  
  8. //=================================================
  9. //=================================================
  10. start:
  11.     waitexec anim/default_inithandler.scr
  12.     waitexec anim/smoking.scr::SmokeRemoveCigarette
  13.     self weaponcommand mainhand attachtohand mainhand
  14.  
  15.     //make sure we are standing...
  16.     waitexec anim/stand.scr::transition
  17.  
  18.     self.position = run
  19.     
  20.     while (1)
  21.     {
  22.         self.blendtime = 0.30
  23.  
  24.         switch (self.weapongroup)
  25.         {
  26.             pistol:
  27.             rifle:
  28.             mp40:
  29.             mp44:
  30.             bar:
  31.             thompson:
  32.             unarmed:
  33.             bazooka:
  34.                 if (self.ground == water)
  35.                 {
  36.                     self setmotionanim run_rifle_water
  37.                     self waittill flaggedanimdone
  38.                 }
  39.                 else if (self.ground == beach)
  40.                 {
  41.                     self setmotionanim run_rifle_gundown_beach
  42.                     self waittill flaggedanimdone
  43.                 }
  44.                  else if (self.normal_health < 60)    // TODO, should be 30, but it'd never fire.
  45.                 {
  46.                     if (self.movedir != (0 0 0))
  47.                     {
  48.                         //println "Run.scr using motion blend for injure run with movedir: " self.movedir
  49.                         waitexec anim/motionblend.scr::PlayAnim (self.weapongroup + "_injurerun_")
  50.                     }
  51.                     else
  52.                     {
  53.                         //println "Run.scr with **NO** motion blend for INJURE RUN"
  54.                         self setmotionanim (self.weapongroup + "_injurerun_forward")
  55.                         self waittill flaggedanimdone
  56.                     }
  57.                 }
  58.                 else
  59.                 {
  60.                     if (self.movedir != (0 0 0))
  61.                     {
  62.                         //println "Run.scr using motion blend with movedir: " self.movedir
  63.                         waitexec anim/motionblend.scr::PlayAnim (self.weapongroup + "_run_")
  64.                     }
  65.                     else
  66.                     {
  67.                         //println "Run.scr with **NO** motion blend"
  68.                         self setmotionanim (self.weapongroup + "_run_forward")
  69.                         self waittill flaggedanimdone
  70.                     }
  71.                 }
  72.  
  73.                 break
  74.                 
  75.             default:
  76.                 println "Run default case for " self.weapongroup " weapongroup - fix Run.scr"
  77.                 self setmotionanim rifle_run_forward
  78.                 self waittill flaggedanimdone
  79.                 break
  80.         }
  81.     }
  82. end
  83.