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

  1. //------
  2. // Idle
  3. //------
  4. // Just be idle, don't do anything you don't have to.  Running or walking will
  5. // stop, but crouching people will keep crouching, curious people (if we ever have
  6. // them) will stay curious.  This does not make people relax - we need a specific
  7. // script to make people play a relaxing animation.
  8.  
  9.  
  10. //======================================================================
  11. //======================================================================
  12. IdleMain:
  13.     //println "Entering idle.scr"
  14.     //println "Called Idle.scr with position " self.position " mood " self.mood
  15.  
  16.     waitexec "anim/default_inithandler.scr"
  17.  
  18.     self.blendtime = 0.5    // Slow blendtime to avoid popping during idles.
  19.  
  20.     switch (self.position)
  21.     {
  22.         crouch:
  23.         crouchwalk:
  24.         crouchrun:
  25.             while (1)
  26.                 waitexec anim/crouch.scr
  27.  
  28.         stand:
  29.         walk:
  30.         run:
  31.             while (1)
  32.                 waitexec anim/stand.scr
  33.  
  34.         prone:
  35.         pronewalk:
  36.             while (1)
  37.                 waitexec anim/prone.scr
  38.  
  39.         dead:
  40.             println "^~^~^ Dead guy trying to idle."
  41.             break
  42.         knees:
  43.         crawl:
  44.         floor:
  45.             // Oh my goodness I'm in agony!  Try to stand up, see if your legs will hold
  46.             // you.  (My first aid instructor always said that you should stay down so
  47.             // you didn't lose bloodflow to the brain and faint or worse.  These guys are
  48.             // more gung-ho than me I guess.)
  49.             waitexec anim/continue_pain.scr
  50.             goto IdleMain
  51.  
  52.         default:
  53.             println ("^~^~^ Idle Default case for "+self.position+" position - fix idle.scr")
  54.             break
  55.     }
  56. end
  57.