home *** CD-ROM | disk | FTP | other *** search
/ Hráč 1998 July & August / Hrac_23_1998-07-08_cd2.bin / Demos / Sin / setup.exe / DATA / base / Pak0.pak / global / neutral.scr < prev    next >
Text File  |  1998-07-26  |  3KB  |  122 lines

  1. //
  2. // neutral.scr
  3. //
  4. // This file is parsed by actors.  It sets up the AI states.
  5. //
  6.  
  7. pause
  8. !init:
  9.  
  10. local.self civilian
  11. local.self ignoreall
  12. local.self respondto act_idle                    idle
  13. local.self state act_idle
  14.  
  15. end
  16.  
  17.  
  18. //************************************************************
  19. //
  20. // idle:
  21. // Alert, but standing around waiting for action.
  22. //
  23. //************************************************************
  24.  
  25. idle:
  26.  
  27. local.self clearstate
  28.  
  29. local.self respondto act_pain                    pain
  30.  
  31. local.self respondto act_opendoor            opendoor
  32.  
  33. local.self respondto act_sightenemy            flee
  34. local.self respondto act_weaponsound        flee
  35. local.self respondto act_painsound            flee
  36. local.self respondto act_deathsound            flee
  37. local.self respondto act_breakingsound        flee
  38. local.self respondto act_mutantsound        flee
  39.  
  40. local.self respondto act_twitch                twitch
  41. local.self respondto act_stop                    idle
  42.  
  43. idle_loop:
  44.  
  45. local.self idle "idle"
  46. waitFor local.self
  47. goto idle_loop
  48.  
  49. end
  50.  
  51. //************************************************************
  52. //
  53. // pain:
  54. // Called when actor damaged
  55. //
  56. //************************************************************
  57.  
  58. pain:
  59.  
  60. // ignore most messages
  61. local.self ignore act_pain    act_opendoor attackentity act_used act_sightenemy
  62. local.self ignore act_weaponsound act_movementsound act_painsound act_deathsound act_breakingsound
  63. local.self ignore act_doorsound act_mutantsound act_voicesound act_machinesound act_radiosound
  64. local.self ignore act_runtoarea act_twitch act_stop
  65.  
  66. local.self anim local.painanim
  67. waitFor local.self
  68.  
  69. end
  70.  
  71. //************************************************************
  72. //
  73. // opendoor:
  74. // Called when actor blocked by door
  75. //
  76. //************************************************************
  77.  
  78. opendoor:
  79.  
  80. local.self behavior OpenDoor local.dir
  81. waitFor local.self
  82.  
  83. end
  84.  
  85. //************************************************************
  86. //
  87. // twitch:
  88. // Called periodically by idle command
  89. //
  90. //************************************************************
  91.  
  92. twitch:
  93.  
  94. local.self anim "twitch"
  95. waitFor local.self
  96.  
  97. end
  98.  
  99. //************************************************************
  100. //
  101. // flee:
  102. // Actor runs from enemy and uses cover
  103. //
  104. //************************************************************
  105.  
  106. flee:
  107.  
  108. local.self clearstate
  109.  
  110. local.self respondto act_twitch                twitch
  111. local.self respondto act_stop                    idle
  112.  
  113. local.self ignore act_activated                act_used                    act_sightenemy        act_nearfriend        runtoarea
  114. local.self ignore act_weaponsound            act_movementsound        act_painsound        act_deathsound        act_breakingsound 
  115. local.self ignore act_doorsound                act_mutantsound        act_voicesound        act_machinesound    act_radiosound 
  116.  
  117. local.self behavior Hide "run"
  118. waitFor local.self
  119.  
  120. local.self state act_idle
  121. end
  122.