home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / games / lib / net3d / tank.v < prev   
Encoding:
Text File  |  1995-07-13  |  1.3 KB  |  83 lines

  1. #include "tank.def.v"
  2.  
  3. vehicle tank {
  4. instance tank
  5. offset 1300 920 0 
  6. /* offset -20 -20 0 */
  7.  
  8. brain {
  9.     state 0 {    /* looking for a target */
  10.         action left
  11.         link 1 { threatfar }
  12.         }
  13.     state 1 {    /* found a target, go for it */
  14.         action accel
  15.         action shoot
  16.         link 2 { collision }
  17.         link 0 { !threatfar }
  18.         }
  19.     state 2 {    /* almost hit something */
  20.         action starttimer
  21.         action stop
  22.         link 4 { always }
  23.         }
  24.     state 4 {    /* back off */
  25.         action decel
  26.         /* link 5 { collision } */
  27.         link 6 { !counting }
  28.         }
  29.     state 5 {    /* hit something while backing off */
  30.         action stop
  31.         link 0 { always }
  32.         }
  33.     state 6 {    /* drive around a bit */
  34.         action stop
  35.         action starttimer
  36.         link 7 { always }
  37.         }
  38.     state 7 {
  39.         action accel
  40.         link 0 { !counting }
  41.         link 8 { maybe }    /* pick one of 8 or 9 */
  42.         link 9 { always }
  43.         }
  44.     state 8 {
  45.         action left
  46.         link 7 { always }
  47.         }
  48.     state 9 {
  49.         action right
  50.         link 7 { always }
  51.         }
  52.     }
  53. #if 0
  54. brain {
  55.     state 0 {    /* accel a bit */
  56.         action accel
  57.         link 1 { always }
  58.         }
  59.     state 1 {    /* looking */
  60.         action left
  61.         link 0 { !moving }
  62.         link 3 { underfire }
  63.         link 2 { threatfar !ammolow }
  64.         }
  65.     state 2 {    /* got target! */
  66.         action shoot 
  67.         action accel
  68.         link 3 { underfire }
  69.         link 1 { !threatfar }
  70.         }
  71.     state 3 {    /* starting to run */
  72.         action starttimer
  73.         link 4 { always }
  74.         }
  75.     state 4 {    /* running */
  76.         action accel
  77.         link 1 { !counting }
  78.         }
  79.     }
  80. #endif
  81. }
  82.  
  83.