mission.fsm 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171
  1. /*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, Get the Documents">*/
  2. /*%FSM<HEAD>*/
  3. /*
  4. item0[] = {"Get_the_Message",0,250,75.000000,-225.000000,175.000000,-175.000000,0.000000,"Get the" \n "Message" \n "Side Mission"};
  5. item1[] = {"Let_s_go_",8,218,75.000000,-150.000000,175.000000,-100.000000,0.000000,"Let's go!"};
  6. item2[] = {"Create_officer_",2,250,75.000000,-75.000000,175.000000,-25.000000,0.000000,"Create officer," \n "troops, escape" \n "chopper + radio, gun bag"};
  7. item3[] = {"Captured",4,218,-225.000000,-75.000000,-125.000000,-25.000000,2.000000,"Captured"};
  8. item4[] = {"Spooked",4,218,75.000000,0.000000,175.000000,50.000000,1.000000,"Spooked"};
  9. item5[] = {"Dead",4,218,375.000000,-75.000000,475.000000,-25.000000,0.000000,"Dead"};
  10. item6[] = {"What_do_",2,250,375.000000,150.000000,475.000000,200.000000,0.000000,"What do?"};
  11. item7[] = {"Papers_on_corpse",4,218,500.000000,225.000000,600.000000,275.000000,1.000000,"Papers" \n "on corpse" \n "(small chance)"};
  12. item8[] = {"Nothing__FAIL",8,218,375.000000,225.000000,475.000000,275.000000,0.000000,"Nothing." \n "FAIL"};
  13. item9[] = {"FAIL_No_papers_on",1,250,375.000000,300.000000,475.000000,350.000000,0.000000,"FAIL" \n "No papers" \n "on corpse"};
  14. item10[] = {"Papers_shot__unr",4,218,250.000000,225.000000,350.000000,275.000000,2.000000,"Papers shot;" \n "unreadable"};
  15. item11[] = {"Where_ya_gonna_go",2,250,75.000000,350.000000,175.000000,400.000000,0.000000,"Where ya" \n "gonna go?"};
  16. item12[] = {"Run_to_chopper",4,218,450.000000,575.000000,550.000000,625.000000,1.000000,"Run to" \n "chopper"};
  17. item13[] = {"Run_to_radio__if",4,218,-350.000000,425.000000,-250.000000,475.000000,1.000000,"Run to" \n "radio" \n "(if near)"};
  18. item14[] = {"Run_to_gun__small",4,218,-225.000000,725.000000,-125.000000,775.000000,1.000000,"Run to" \n "gun" \n "(small chance)" \n "(if near)"};
  19. item15[] = {"Set_talk_action",2,250,-350.000000,-75.000000,-250.000000,-25.000000,0.000000,"Set talk action;" \n "knows where" \n "papers are?"};
  20. item16[] = {"On_officer__more",4,218,-225.000000,225.000000,-125.000000,275.000000,0.000000,"On officer" \n "(more inclined" \n "if hurt)"};
  21. item17[] = {"__Fuck_you____not",4,218,-100.000000,150.000000,0.000000,200.000000,2.000000,"""Fuck you.""" \n "(not if hurt)"};
  22. item18[] = {"RUUUUUN_",2,250,575.000000,650.000000,675.000000,700.000000,0.000000,"RUUUUUN!"};
  23. item19[] = {"Gets_into_choppe",4,218,700.000000,650.000000,800.000000,700.000000,1.000000,"Gets into" \n "chopper"};
  24. item20[] = {"Chopper_don_t_exist",4,218,450.000000,650.000000,550.000000,700.000000,0.000000,"Chopper" \n "don't exist!"};
  25. item21[] = {"Wait_for_some_cool",2,250,825.000000,650.000000,925.000000,700.000000,0.000000,"Wait for some" \n "cool shit to" \n "happen"};
  26. item22[] = {"Captured",4,218,700.000000,725.000000,800.000000,775.000000,0.000000,"Captured"};
  27. item23[] = {"Chopper_got_away",4,218,950.000000,650.000000,1050.000000,700.000000,2.000000,"Chopper got" \n "away" \n "(>2000m)"};
  28. item24[] = {"Chopper_down_BUT",4,218,950.000000,725.000000,1050.000000,775.000000,1.000000,"Chopper down" \n "BUT ALIVE"};
  29. item25[] = {"Woo_chase_sequence",2,250,-350.000000,500.000000,-250.000000,550.000000,0.000000,"Woo chase" \n "sequence!"};
  30. item26[] = {"Wait_for_even_more",2,250,1075.000000,725.000000,1175.000000,775.000000,0.000000,"Wait for even" \n "more cool shit" \n "to happen"};
  31. item27[] = {"got_away___2000m",4,218,1200.000000,650.000000,1300.000000,700.000000,1.000000,"got away" \n "(>2000m)"};
  32. item28[] = {"Captured",4,218,1200.000000,800.000000,1300.000000,850.000000,0.000000,"Captured"};
  33. item29[] = {"FAIL_Officer_dead",1,250,825.000000,800.000000,925.000000,850.000000,0.000000,"FAIL" \n "Officer dead;" \n "corpse lost"};
  34. item30[] = {"Dead",4,218,-475.000000,575.000000,-375.000000,625.000000,0.000000,"Dead"};
  35. item31[] = {"Shot_Papers__if",4,218,-100.000000,225.000000,0.000000,275.000000,1.000000,"Shot Papers" \n "(if hurt)" \n "(small chance)"};
  36. item32[] = {"Dead",4,218,700.000000,575.000000,800.000000,625.000000,0.000000,"Dead"};
  37. item33[] = {"He_gots_shot_in",4,218,825.000000,725.000000,925.000000,775.000000,0.000000,"He gots shot" \n "in the chopper!"};
  38. item34[] = {"SUCCESS_Papers_on",1,250,500.000000,300.000000,600.000000,350.000000,0.000000,"SUCCESS" \n "Papers on" \n "corpse"};
  39. item35[] = {"Units_more_than",4,218,-100.000000,0.000000,0.000000,50.000000,3.000000,"Units" \n "more than" \n "10m away"};
  40. item36[] = {"Just_go_SOMEWHERE",8,218,75.000000,500.000000,175.000000,550.000000,0.000000,"Just go" \n "SOMEWHERE" \n "(last resort)"};
  41. item37[] = {"Get_going_",2,250,-350.000000,800.000000,-250.000000,850.000000,0.000000,"Get going!"};
  42. item38[] = {"Get_gun",4,218,-475.000000,800.000000,-375.000000,850.000000,0.000000,"Get gun"};
  43. item39[] = {"Dead",4,218,-475.000000,875.000000,-375.000000,925.000000,0.000000,"Dead"};
  44. item40[] = {"Engage_until_hur",2,250,-600.000000,800.000000,-500.000000,850.000000,0.000000,"Engage until hurt"};
  45. item41[] = {"Captured",4,218,-725.000000,800.000000,-625.000000,850.000000,0.000000,"Captured"};
  46. item42[] = {"Dead",4,218,-350.000000,75.000000,-250.000000,125.000000,4.000000,"Dead"};
  47. item43[] = {"SUCCESS_Papers_on_1",1,250,-225.000000,300.000000,-125.000000,350.000000,0.000000,"SUCCESS" \n "Papers on" \n "Officer"};
  48. item44[] = {"FAIL_Papers_have",1,250,250.000000,300.000000,350.000000,350.000000,0.000000,"FAIL" \n "Papers have" \n "been shot"};
  49. item45[] = {"",7,210,746.000000,-54.000000,754.000000,-45.999996,0.000000,""};
  50. item46[] = {"Captured",4,218,-475.000000,725.000000,-375.000000,775.000000,0.000000,"Captured"};
  51. item47[] = {"Wait_for_action",4,218,-225.000000,75.000000,-125.000000,125.000000,0.000000,"Wait for" \n "action trigger"};
  52. item48[] = {"Captured",4,218,-475.000000,500.000000,-375.000000,550.000000,0.000000,"Captured"};
  53. item49[] = {"Get_to_radio",4,218,-350.000000,575.000000,-250.000000,625.000000,0.000000,"Get to" \n "radio"};
  54. item50[] = {"Transmit_coords",2,250,-350.000000,650.000000,-250.000000,700.000000,0.000000,"Transmit" \n "coords;" \n "spawn PT"};
  55. item51[] = {"Run_again_",4,218,-225.000000,575.000000,-125.000000,625.000000,0.000000,"Run again!"};
  56. item52[] = {"Going_somewhere",2,250,75.000000,575.000000,175.000000,625.000000,0.000000,"Going" \n "somewhere"};
  57. item53[] = {"Dead",4,218,200.000000,650.000000,300.000000,700.000000,0.000000,"Dead"};
  58. item54[] = {"Got_away___1000m",4,218,75.000000,650.000000,175.000000,700.000000,0.000000,"Got away" \n "(>1000m)"};
  59. item55[] = {"Dead",4,218,1200.000000,725.000000,1300.000000,775.000000,0.000000,"Dead"};
  60. item56[] = {"Captured",4,218,-50.000000,650.000000,50.000000,700.000000,0.000000,"Captured"};
  61. item57[] = {"What_do__1",2,250,-225.000000,150.000000,-125.000000,200.000000,0.000000,"What do?"};
  62. item58[] = {"FAIL_Shot_Papers",1,250,-100.000000,300.000000,0.000000,350.000000,0.000000,"FAIL" \n "Shot Papers"};
  63. item59[] = {"FAIL_Lost_Office",1,250,75.000000,725.000000,175.000000,775.000000,0.000000,"FAIL" \n "Lost Officer"};
  64. item60[] = {"FAIL_Lost_Office_1",1,250,1075.000000,650.000000,1175.000000,700.000000,0.000000,"FAIL" \n "Lost Officer"};
  65. item61[] = {"Dead",4,218,-600.000000,875.000000,-500.000000,925.000000,0.000000,"Dead"};
  66. item62[] = {"",7,210,1371.000000,746.000000,1379.000000,754.000000,0.000000,""};
  67. item63[] = {"",7,210,1371.000000,-54.000000,1379.000000,-45.999996,0.000000,""};
  68. item64[] = {"",7,210,246.000000,971.000000,254.000000,979.000000,0.000000,""};
  69. item65[] = {"",7,210,1371.000000,971.000000,1379.000000,979.000000,0.000000,""};
  70. item66[] = {"",7,210,-429.000000,971.000000,-421.000000,979.000000,0.000000,""};
  71. item67[] = {"",7,210,-554.000000,971.000000,-546.000000,979.000000,0.000000,""};
  72. item68[] = {"",7,210,-804.000000,596.000000,-796.000000,604.000000,0.000000,""};
  73. item69[] = {"",7,210,-804.000000,971.000000,-796.000000,979.000000,0.000000,""};
  74. item70[] = {"",7,210,-804.000000,96.000008,-796.000000,104.000000,0.000000,""};
  75. item71[] = {"",7,210,746.000000,1021.000000,754.000000,1029.000000,0.000000,""};
  76. item72[] = {"",7,210,-854.000000,1021.000000,-846.000000,1029.000000,0.000000,""};
  77. item73[] = {"",7,210,-854.000000,-54.000023,-846.000000,-45.999977,0.000000,""};
  78. item74[] = {"",7,210,1246.000000,1021.000000,1254.000000,1029.000000,0.000000,""};
  79. item75[] = {"",7,210,-4.000000,1021.000000,4.000000,1029.000000,0.000000,""};
  80. item76[] = {"",7,210,-854.000000,821.000000,-846.000000,829.000000,0.000000,""};
  81. item77[] = {"",7,210,-854.000000,746.000000,-846.000000,754.000000,0.000000,""};
  82. item78[] = {"",7,210,-854.000000,521.000061,-846.000000,529.000000,0.000000,""};
  83. item79[] = {"And_to_the_actio",8,218,-350.000000,0.000000,-250.000000,50.000000,0.000000,"And to" \n "the actions"};
  84. item80[] = {"Add_action",2,250,-225.000000,0.000000,-125.000000,50.000000,0.000000,"Add" \n "action"};
  85. item81[] = {"Add_dead_marker",2,250,500.000000,-75.000000,600.000000,-25.000000,0.000000,"Add dead marker"};
  86. item82[] = {"And_to_the_actions",8,218,500.000000,0.000000,600.000000,50.000000,0.000000,"And to" \n "the actions!"};
  87. item83[] = {"Add_action_1",2,4346,375.000000,0.000000,475.000000,50.000000,0.000000,"Add action"};
  88. item84[] = {"Wait_for_action",4,218,375.000000,75.000000,475.000000,125.000000,0.000000,"Wait for" \n "action trigger"};
  89. item85[] = {"Damaged__JUMP_",4,218,950.000000,800.000000,1050.000000,850.000000,0.000000,"Damaged?" \n "JUMP!"};
  90. item86[] = {"Wait_for_it___",2,250,1000.000000,875.000000,1100.000000,925.000000,0.000000,"Wait for it..."};
  91. item87[] = {"Open_dat__chute",4,218,1075.000000,800.000000,1175.000000,850.000000,0.000000,"Open dat 'chute!"};
  92. item88[] = {"Body___wreckage",4,218,500.000000,75.000000,600.000000,125.000000,0.000000,"Body / wreckage" \n "gone?"};
  93. item89[] = {"FAIL_Well__fuck",1,250,625.000000,75.000000,725.000000,125.000000,0.000000,"FAIL" \n "Well, fuck."};
  94. item90[] = {"Wait_until_on_the",2,250,700.000000,-150.000000,800.000000,-100.000000,0.000000,"Wait until on" \n "the floor..."};
  95. item91[] = {"On_the_floor",4,218,500.000000,-150.000000,600.000000,-100.000000,0.000000,"On the floor"};
  96. link0[] = {0,1};
  97. link1[] = {1,2};
  98. link2[] = {2,3};
  99. link3[] = {2,4};
  100. link4[] = {2,5};
  101. link5[] = {3,15};
  102. link6[] = {4,11};
  103. link7[] = {5,81};
  104. link8[] = {6,7};
  105. link9[] = {6,8};
  106. link10[] = {6,10};
  107. link11[] = {7,34};
  108. link12[] = {8,9};
  109. link13[] = {10,44};
  110. link14[] = {11,12};
  111. link15[] = {11,13};
  112. link16[] = {11,14};
  113. link17[] = {11,36};
  114. link18[] = {12,18};
  115. link19[] = {13,25};
  116. link20[] = {14,37};
  117. link21[] = {15,79};
  118. link22[] = {16,43};
  119. link23[] = {17,80};
  120. link24[] = {18,19};
  121. link25[] = {18,20};
  122. link26[] = {18,22};
  123. link27[] = {18,32};
  124. link28[] = {19,21};
  125. link29[] = {20,11};
  126. link30[] = {21,23};
  127. link31[] = {21,24};
  128. link32[] = {21,33};
  129. link33[] = {21,85};
  130. link34[] = {22,71};
  131. link35[] = {23,60};
  132. link36[] = {24,26};
  133. link37[] = {25,30};
  134. link38[] = {25,48};
  135. link39[] = {25,49};
  136. link40[] = {26,27};
  137. link41[] = {26,28};
  138. link42[] = {26,55};
  139. link43[] = {27,60};
  140. link44[] = {28,74};
  141. link45[] = {30,68};
  142. link46[] = {31,58};
  143. link47[] = {32,45};
  144. link48[] = {33,29};
  145. link49[] = {35,11};
  146. link50[] = {36,52};
  147. link51[] = {37,38};
  148. link52[] = {37,39};
  149. link53[] = {37,46};
  150. link54[] = {38,40};
  151. link55[] = {39,66};
  152. link56[] = {40,41};
  153. link57[] = {40,61};
  154. link58[] = {41,76};
  155. link59[] = {42,70};
  156. link60[] = {45,90};
  157. link61[] = {46,77};
  158. link62[] = {47,57};
  159. link63[] = {48,78};
  160. link64[] = {49,50};
  161. link65[] = {50,51};
  162. link66[] = {51,11};
  163. link67[] = {52,53};
  164. link68[] = {52,54};
  165. link69[] = {52,56};
  166. link70[] = {53,64};
  167. link71[] = {54,59};
  168. link72[] = {55,62};
  169. link73[] = {56,75};
  170. link74[] = {57,16};
  171. link75[] = {57,17};
  172. link76[] = {57,31};
  173. link77[] = {61,67};
  174. link78[] = {62,63};
  175. link79[] = {63,45};
  176. link80[] = {64,65};
  177. link81[] = {65,62};
  178. link82[] = {66,64};
  179. link83[] = {67,66};
  180. link84[] = {68,69};
  181. link85[] = {69,67};
  182. link86[] = {70,68};
  183. link87[] = {71,75};
  184. link88[] = {72,76};
  185. link89[] = {73,15};
  186. link90[] = {74,71};
  187. link91[] = {75,72};
  188. link92[] = {76,77};
  189. link93[] = {77,78};
  190. link94[] = {78,73};
  191. link95[] = {79,80};
  192. link96[] = {80,35};
  193. link97[] = {80,42};
  194. link98[] = {80,47};
  195. link99[] = {81,82};
  196. link100[] = {82,83};
  197. link101[] = {83,84};
  198. link102[] = {83,88};
  199. link103[] = {84,6};
  200. link104[] = {85,86};
  201. link105[] = {86,87};
  202. link106[] = {87,26};
  203. link107[] = {88,89};
  204. link108[] = {90,91};
  205. link109[] = {91,81};
  206. globals[] = {25.000000,1,0,0,0,640,480,1,132,6316128,1,-278.187256,1043.500610,848.030090,-300.483276,1473,1280,1};
  207. window[] = {2,-1,-1,-1,-1,890,130,1637,130,3,1491};
  208. *//*%FSM</HEAD>*/
  209. class FSM
  210. {
  211. fsmName = "Get the Documents";
  212. class States
  213. {
  214. /*%FSM<STATE "Get_the_Message">*/
  215. class Get_the_Message
  216. {
  217. name = "Get_the_Message";
  218. init = /*%FSM<STATEINIT""">*/"_pos = _this select 0;" \n
  219. "_code = _this select 1;" \n
  220. "_captureDistance = 10;"/*%FSM</STATEINIT""">*/;
  221. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  222. class Links
  223. {
  224. /*%FSM<LINK "Let_s_go_">*/
  225. class Let_s_go_
  226. {
  227. priority = 0.000000;
  228. to="Create_officer_";
  229. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  230. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  231. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  232. };
  233. /*%FSM</LINK>*/
  234. };
  235. };
  236. /*%FSM</STATE>*/
  237. /*%FSM<STATE "Create_officer_">*/
  238. class Create_officer_
  239. {
  240. name = "Create_officer_";
  241. init = /*%FSM<STATEINIT""">*/"_friendlyMan = objNull;" \n
  242. "_options = [""radio"", ""chopper"", ""gun""];" \n
  243. "" \n
  244. "_gEnemies = createGroup east;" \n
  245. "_gChopper = createGroup east;" \n
  246. "_gOfficer = createGroup east;" \n
  247. "" \n
  248. "_rDir = random 360;" \n
  249. "_rDist = (4 + (random 11));" \n
  250. "_pOfficer = [_pos, _rDist, _rDir] call BIS_fnc_relPos;" \n
  251. "_rChopperDir = random 360;" \n
  252. "" \n
  253. "_officer = _gOfficer createUnit [""O_officer_F"", _pOfficer, [], 0, ""NONE""];" \n
  254. "removeAllWeapons _officer;" \n
  255. "removeAllItems _officer;" \n
  256. "_chopper = ""O_Heli_Light_02_F"" createVehicle _pos;" \n
  257. "_chopper setDir _rChopperDir;" \n
  258. "[_chopper, _gChopper] call BIS_fnc_spawnCrew;"/*%FSM</STATEINIT""">*/;
  259. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  260. class Links
  261. {
  262. /*%FSM<LINK "Captured">*/
  263. class Captured
  264. {
  265. priority = 2.000000;
  266. to="Set_talk_action";
  267. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  268. "" \n
  269. "{" \n
  270. " if ((_x distance _officer) <= _captureDistance) then" \n
  271. " {" \n
  272. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  273. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  274. " };" \n
  275. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  276. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  277. action=/*%FSM<ACTION""">*/"hint ""Captured!"";"/*%FSM</ACTION""">*/;
  278. };
  279. /*%FSM</LINK>*/
  280. /*%FSM<LINK "Spooked">*/
  281. class Spooked
  282. {
  283. priority = 1.000000;
  284. to="Where_ya_gonna_go";
  285. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  286. condition=/*%FSM<CONDITION""">*/"(_officer call BIS_fnc_enemyDetected)"/*%FSM</CONDITION""">*/;
  287. action=/*%FSM<ACTION""">*/"hint ""Spooked!"";"/*%FSM</ACTION""">*/;
  288. };
  289. /*%FSM</LINK>*/
  290. /*%FSM<LINK "Dead">*/
  291. class Dead
  292. {
  293. priority = 0.000000;
  294. to="Add_dead_marker";
  295. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  296. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  297. action=/*%FSM<ACTION""">*/"hint ""DEAD!"";"/*%FSM</ACTION""">*/;
  298. };
  299. /*%FSM</LINK>*/
  300. };
  301. };
  302. /*%FSM</STATE>*/
  303. /*%FSM<STATE "What_do_">*/
  304. class What_do_
  305. {
  306. name = "What_do_";
  307. init = /*%FSM<STATEINIT""">*/"_chance = random 1;" \n
  308. "hint format[""_chance = %1"", _chance];"/*%FSM</STATEINIT""">*/;
  309. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  310. class Links
  311. {
  312. /*%FSM<LINK "Papers_shot__unr">*/
  313. class Papers_shot__unr
  314. {
  315. priority = 2.000000;
  316. to="FAIL_Papers_have";
  317. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  318. condition=/*%FSM<CONDITION""">*/"_chance < 0.3"/*%FSM</CONDITION""">*/;
  319. action=/*%FSM<ACTION""">*/"{ [_x] call AW_fnc_deleteMarker; } forEach _missionUpdate;"/*%FSM</ACTION""">*/;
  320. };
  321. /*%FSM</LINK>*/
  322. /*%FSM<LINK "Papers_on_corpse">*/
  323. class Papers_on_corpse
  324. {
  325. priority = 1.000000;
  326. to="SUCCESS_Papers_on";
  327. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  328. condition=/*%FSM<CONDITION""">*/"_chance > 0.3 && _chance < 0.5"/*%FSM</CONDITION""">*/;
  329. action=/*%FSM<ACTION""">*/"{ [_x] call AW_fnc_deleteMarker; } forEach _missionUpdate;"/*%FSM</ACTION""">*/;
  330. };
  331. /*%FSM</LINK>*/
  332. /*%FSM<LINK "Nothing__FAIL">*/
  333. class Nothing__FAIL
  334. {
  335. priority = 0.000000;
  336. to="FAIL_No_papers_on";
  337. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  338. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  339. action=/*%FSM<ACTION""">*/"{ [_x] call AW_fnc_deleteMarker; } forEach _missionUpdate;"/*%FSM</ACTION""">*/;
  340. };
  341. /*%FSM</LINK>*/
  342. };
  343. };
  344. /*%FSM</STATE>*/
  345. /*%FSM<STATE "FAIL_No_papers_on">*/
  346. class FAIL_No_papers_on
  347. {
  348. name = "FAIL_No_papers_on";
  349. init = /*%FSM<STATEINIT""">*/"result = false;"/*%FSM</STATEINIT""">*/;
  350. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  351. class Links
  352. {
  353. };
  354. };
  355. /*%FSM</STATE>*/
  356. /*%FSM<STATE "Where_ya_gonna_go">*/
  357. class Where_ya_gonna_go
  358. {
  359. name = "Where_ya_gonna_go";
  360. init = /*%FSM<STATEINIT""">*/"//_choice = if ((count _options) > 0) then { _options call BIS_fnc_selectRandom } else { ""somewhere"" };" \n
  361. "_choice = ""chopper"";"/*%FSM</STATEINIT""">*/;
  362. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  363. class Links
  364. {
  365. /*%FSM<LINK "Run_to_radio__if">*/
  366. class Run_to_radio__if
  367. {
  368. priority = 1.000000;
  369. to="Woo_chase_sequence";
  370. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  371. condition=/*%FSM<CONDITION""">*/"_choice == ""radio"""/*%FSM</CONDITION""">*/;
  372. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  373. };
  374. /*%FSM</LINK>*/
  375. /*%FSM<LINK "Run_to_gun__small">*/
  376. class Run_to_gun__small
  377. {
  378. priority = 1.000000;
  379. to="Get_going_";
  380. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  381. condition=/*%FSM<CONDITION""">*/"_choice == ""gun"""/*%FSM</CONDITION""">*/;
  382. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  383. };
  384. /*%FSM</LINK>*/
  385. /*%FSM<LINK "Run_to_chopper">*/
  386. class Run_to_chopper
  387. {
  388. priority = 1.000000;
  389. to="RUUUUUN_";
  390. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  391. condition=/*%FSM<CONDITION""">*/"_choice == ""chopper"""/*%FSM</CONDITION""">*/;
  392. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  393. };
  394. /*%FSM</LINK>*/
  395. /*%FSM<LINK "Just_go_SOMEWHERE">*/
  396. class Just_go_SOMEWHERE
  397. {
  398. priority = 0.000000;
  399. to="Going_somewhere";
  400. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  401. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  402. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  403. };
  404. /*%FSM</LINK>*/
  405. };
  406. };
  407. /*%FSM</STATE>*/
  408. /*%FSM<STATE "Set_talk_action">*/
  409. class Set_talk_action
  410. {
  411. name = "Set_talk_action";
  412. init = /*%FSM<STATEINIT""">*/"_sounds = [""freeze1"", ""freeze2"", ""freeze3"", ""freeze4"", ""freeze5""];" \n
  413. "_sound = _sounds call BIS_fnc_selectRandom;" \n
  414. "" \n
  415. "[_sound, _friendlyMan, 30] call AW_fnc_playSound;" \n
  416. "_officer playAction ""Surrender"";" \n
  417. "_officer disableAI ""ANIM"";"/*%FSM</STATEINIT""">*/;
  418. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  419. class Links
  420. {
  421. /*%FSM<LINK "And_to_the_actio">*/
  422. class And_to_the_actio
  423. {
  424. priority = 0.000000;
  425. to="Add_action";
  426. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  427. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  428. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  429. };
  430. /*%FSM</LINK>*/
  431. };
  432. };
  433. /*%FSM</STATE>*/
  434. /*%FSM<STATE "RUUUUUN_">*/
  435. class RUUUUUN_
  436. {
  437. name = "RUUUUUN_";
  438. init = /*%FSM<STATEINIT""">*/"_wOfficer = _gOfficer addWaypoint [(getPosATL _chopper), 5];" \n
  439. "_wOfficer setWaypointType ""GETIN NEAREST"";" \n
  440. "_wOfficer setWaypointBehaviour ""AWARE"";" \n
  441. "_wOfficer setWaypointCombatMode ""GREEN"";" \n
  442. "_wOfficer setWaypointSpeed ""FULL"";" \n
  443. "_wOfficer setWaypointStatements [""true"", ""_officer assignAsCargo _chopper;""];" \n
  444. "_gOfficer setCurrentWaypoint _wOfficer;" \n
  445. "" \n
  446. "_wChopper = _gChopper addWaypoint [(getPos _chopper), 10];" \n
  447. "_wChopper setWaypointType ""LOAD"";" \n
  448. "_gChopper setCurrentWaypoint _wChopper;" \n
  449. "" \n
  450. "_rChance = random 1;" \n
  451. "hint format[""_rChance = %1"", _rChance];"/*%FSM</STATEINIT""">*/;
  452. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  453. class Links
  454. {
  455. /*%FSM<LINK "Gets_into_choppe">*/
  456. class Gets_into_choppe
  457. {
  458. priority = 1.000000;
  459. to="Wait_for_some_cool";
  460. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  461. condition=/*%FSM<CONDITION""">*/"_officer in _chopper"/*%FSM</CONDITION""">*/;
  462. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  463. };
  464. /*%FSM</LINK>*/
  465. /*%FSM<LINK "Captured">*/
  466. class Captured
  467. {
  468. priority = 0.000000;
  469. to="Set_talk_action";
  470. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  471. "" \n
  472. "{" \n
  473. " if ((_x distance _officer) <= _captureDistance) then" \n
  474. " {" \n
  475. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  476. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  477. " };" \n
  478. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  479. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  480. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  481. };
  482. /*%FSM</LINK>*/
  483. /*%FSM<LINK "Dead">*/
  484. class Dead
  485. {
  486. priority = 0.000000;
  487. to="Wait_until_on_the";
  488. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  489. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  490. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  491. };
  492. /*%FSM</LINK>*/
  493. /*%FSM<LINK "Chopper_don_t_exist">*/
  494. class Chopper_don_t_exist
  495. {
  496. priority = 0.000000;
  497. to="Where_ya_gonna_go";
  498. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  499. condition=/*%FSM<CONDITION""">*/"!alive _chopper"/*%FSM</CONDITION""">*/;
  500. action=/*%FSM<ACTION""">*/"_options = _options - [""chopper""];"/*%FSM</ACTION""">*/;
  501. };
  502. /*%FSM</LINK>*/
  503. };
  504. };
  505. /*%FSM</STATE>*/
  506. /*%FSM<STATE "Wait_for_some_cool">*/
  507. class Wait_for_some_cool
  508. {
  509. name = "Wait_for_some_cool";
  510. init = /*%FSM<STATEINIT""">*/"_officer addBackpack ""B_Parachute"";" \n
  511. "" \n
  512. "_rDir = random 360;" \n
  513. "_rPos = [_pos, 20000, _rDir] call BIS_fnc_relPos;" \n
  514. "" \n
  515. "_wChopper = _gChopper addWaypoint [_rPos, 5];" \n
  516. "_wChopper setWaypointType ""MOVE"";" \n
  517. "_wChopper setWaypointBehaviour ""AWARE"";" \n
  518. "_wChopper setWaypointCombatMode ""BLUE"";" \n
  519. "_wChopper setWaypointSpeed ""FULL"";" \n
  520. "_gChopper setCurrentWaypoint _wChopper;" \n
  521. "" \n
  522. "_chopper flyInHeight 200;" \n
  523. "" \n
  524. "_timeout = (time + 15);" \n
  525. "_willJump = [true] call BIS_fnc_selectRandom;" \n
  526. "_liftedOff = false;" \n
  527. "" \n
  528. "" \n
  529. "[_thisFSM, _chopper] spawn" \n
  530. "{" \n
  531. " _fsmHandle = _this select 0;" \n
  532. " _chopper = _this select 1;" \n
  533. " " \n
  534. " waitUntil { !(isTouchingGround _chopper) };" \n
  535. " _fsmHandle setFSMVariable [""_liftedOff"", true];" \n
  536. "};"/*%FSM</STATEINIT""">*/;
  537. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  538. class Links
  539. {
  540. /*%FSM<LINK "Chopper_got_away">*/
  541. class Chopper_got_away
  542. {
  543. priority = 2.000000;
  544. to="FAIL_Lost_Office_1";
  545. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  546. condition=/*%FSM<CONDITION""">*/"time >= _timeout && ({ (_x distance _officer) < 2000 } count playableUnits) < 1"/*%FSM</CONDITION""">*/;
  547. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  548. };
  549. /*%FSM</LINK>*/
  550. /*%FSM<LINK "Chopper_down_BUT">*/
  551. class Chopper_down_BUT
  552. {
  553. priority = 1.000000;
  554. to="Wait_for_even_more";
  555. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  556. condition=/*%FSM<CONDITION""">*/"time >= _timeout && _liftedOff && isTouchingGround _chopper && alive _officer"/*%FSM</CONDITION""">*/;
  557. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  558. };
  559. /*%FSM</LINK>*/
  560. /*%FSM<LINK "Damaged__JUMP_">*/
  561. class Damaged__JUMP_
  562. {
  563. priority = 0.000000;
  564. to="Wait_for_it___";
  565. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  566. condition=/*%FSM<CONDITION""">*/"time >= _timeout && _willJump && (damage _chopper) > 0.6"/*%FSM</CONDITION""">*/;
  567. action=/*%FSM<ACTION""">*/"_officer action [""EJECT"", _chopper];" \n
  568. "" \n
  569. "_rChance = [false] call BIS_fnc_selectRandom;" \n
  570. "if (_rChance) then" \n
  571. "{" \n
  572. " _crew = [];" \n
  573. "" \n
  574. " {" \n
  575. " _x action [""EJECT"", _chopper];" \n
  576. " _crew = _crew + [_x];" \n
  577. " } foreach (crew _chopper);" \n
  578. "};"/*%FSM</ACTION""">*/;
  579. };
  580. /*%FSM</LINK>*/
  581. /*%FSM<LINK "He_gots_shot_in">*/
  582. class He_gots_shot_in
  583. {
  584. priority = 0.000000;
  585. to="FAIL_Officer_dead";
  586. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  587. condition=/*%FSM<CONDITION""">*/"time >= _timeout && !alive _officer"/*%FSM</CONDITION""">*/;
  588. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  589. };
  590. /*%FSM</LINK>*/
  591. };
  592. };
  593. /*%FSM</STATE>*/
  594. /*%FSM<STATE "Woo_chase_sequence">*/
  595. class Woo_chase_sequence
  596. {
  597. name = "Woo_chase_sequence";
  598. init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
  599. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  600. class Links
  601. {
  602. /*%FSM<LINK "Captured">*/
  603. class Captured
  604. {
  605. priority = 0.000000;
  606. to="Set_talk_action";
  607. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  608. "" \n
  609. "{" \n
  610. " if ((_x distance _officer) <= _captureDistance) then" \n
  611. " {" \n
  612. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  613. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  614. " };" \n
  615. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  616. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  617. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  618. };
  619. /*%FSM</LINK>*/
  620. /*%FSM<LINK "Get_to_radio">*/
  621. class Get_to_radio
  622. {
  623. priority = 0.000000;
  624. to="Transmit_coords";
  625. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  626. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  627. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  628. };
  629. /*%FSM</LINK>*/
  630. /*%FSM<LINK "Dead">*/
  631. class Dead
  632. {
  633. priority = 0.000000;
  634. to="Wait_until_on_the";
  635. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  636. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  637. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  638. };
  639. /*%FSM</LINK>*/
  640. };
  641. };
  642. /*%FSM</STATE>*/
  643. /*%FSM<STATE "Wait_for_even_more">*/
  644. class Wait_for_even_more
  645. {
  646. name = "Wait_for_even_more";
  647. init = /*%FSM<STATEINIT""">*/"[_gOfficer, [[""retreat"", (getPosATL _officer), 2000]]] call AW_fnc_setBehaviour;"/*%FSM</STATEINIT""">*/;
  648. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  649. class Links
  650. {
  651. /*%FSM<LINK "got_away___2000m">*/
  652. class got_away___2000m
  653. {
  654. priority = 1.000000;
  655. to="FAIL_Lost_Office_1";
  656. precondition = /*%FSM<CONDPRECONDITION""">*/"_gotAway = true;" \n
  657. "{" \n
  658. " if ((_x distance _officer) < 2000) exitWith { _gotAway = false; };" \n
  659. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  660. condition=/*%FSM<CONDITION""">*/"_gotAway"/*%FSM</CONDITION""">*/;
  661. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  662. };
  663. /*%FSM</LINK>*/
  664. /*%FSM<LINK "Dead">*/
  665. class Dead
  666. {
  667. priority = 0.000000;
  668. to="Wait_until_on_the";
  669. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  670. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  671. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  672. };
  673. /*%FSM</LINK>*/
  674. /*%FSM<LINK "Captured">*/
  675. class Captured
  676. {
  677. priority = 0.000000;
  678. to="Set_talk_action";
  679. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  680. "" \n
  681. "{" \n
  682. " if ((_x distance _officer) <= _captureDistance) then" \n
  683. " {" \n
  684. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  685. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  686. " };" \n
  687. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  688. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  689. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  690. };
  691. /*%FSM</LINK>*/
  692. };
  693. };
  694. /*%FSM</STATE>*/
  695. /*%FSM<STATE "FAIL_Officer_dead">*/
  696. class FAIL_Officer_dead
  697. {
  698. name = "FAIL_Officer_dead";
  699. init = /*%FSM<STATEINIT""">*/"result = false;"/*%FSM</STATEINIT""">*/;
  700. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  701. class Links
  702. {
  703. };
  704. };
  705. /*%FSM</STATE>*/
  706. /*%FSM<STATE "SUCCESS_Papers_on">*/
  707. class SUCCESS_Papers_on
  708. {
  709. name = "SUCCESS_Papers_on";
  710. init = /*%FSM<STATEINIT""">*/"result = true;"/*%FSM</STATEINIT""">*/;
  711. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  712. class Links
  713. {
  714. };
  715. };
  716. /*%FSM</STATE>*/
  717. /*%FSM<STATE "Get_going_">*/
  718. class Get_going_
  719. {
  720. name = "Get_going_";
  721. init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
  722. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  723. class Links
  724. {
  725. /*%FSM<LINK "Dead">*/
  726. class Dead
  727. {
  728. priority = 0.000000;
  729. to="Wait_until_on_the";
  730. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  731. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  732. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  733. };
  734. /*%FSM</LINK>*/
  735. /*%FSM<LINK "Captured">*/
  736. class Captured
  737. {
  738. priority = 0.000000;
  739. to="Set_talk_action";
  740. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  741. "" \n
  742. "{" \n
  743. " if ((_x distance _officer) <= _captureDistance) then" \n
  744. " {" \n
  745. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  746. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  747. " };" \n
  748. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  749. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  750. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  751. };
  752. /*%FSM</LINK>*/
  753. /*%FSM<LINK "Get_gun">*/
  754. class Get_gun
  755. {
  756. priority = 0.000000;
  757. to="Engage_until_hur";
  758. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  759. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  760. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  761. };
  762. /*%FSM</LINK>*/
  763. };
  764. };
  765. /*%FSM</STATE>*/
  766. /*%FSM<STATE "Engage_until_hur">*/
  767. class Engage_until_hur
  768. {
  769. name = "Engage_until_hur";
  770. init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
  771. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  772. class Links
  773. {
  774. /*%FSM<LINK "Dead">*/
  775. class Dead
  776. {
  777. priority = 0.000000;
  778. to="Wait_until_on_the";
  779. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  780. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  781. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  782. };
  783. /*%FSM</LINK>*/
  784. /*%FSM<LINK "Captured">*/
  785. class Captured
  786. {
  787. priority = 0.000000;
  788. to="Set_talk_action";
  789. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  790. "" \n
  791. "{" \n
  792. " if ((_x distance _officer) <= _captureDistance) then" \n
  793. " {" \n
  794. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  795. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  796. " };" \n
  797. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  798. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  799. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  800. };
  801. /*%FSM</LINK>*/
  802. };
  803. };
  804. /*%FSM</STATE>*/
  805. /*%FSM<STATE "SUCCESS_Papers_on_1">*/
  806. class SUCCESS_Papers_on_1
  807. {
  808. name = "SUCCESS_Papers_on_1";
  809. init = /*%FSM<STATEINIT""">*/"result = true;"/*%FSM</STATEINIT""">*/;
  810. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  811. class Links
  812. {
  813. };
  814. };
  815. /*%FSM</STATE>*/
  816. /*%FSM<STATE "FAIL_Papers_have">*/
  817. class FAIL_Papers_have
  818. {
  819. name = "FAIL_Papers_have";
  820. init = /*%FSM<STATEINIT""">*/"result = false;"/*%FSM</STATEINIT""">*/;
  821. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  822. class Links
  823. {
  824. };
  825. };
  826. /*%FSM</STATE>*/
  827. /*%FSM<STATE "Transmit_coords">*/
  828. class Transmit_coords
  829. {
  830. name = "Transmit_coords";
  831. init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
  832. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  833. class Links
  834. {
  835. /*%FSM<LINK "Run_again_">*/
  836. class Run_again_
  837. {
  838. priority = 0.000000;
  839. to="Where_ya_gonna_go";
  840. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  841. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  842. action=/*%FSM<ACTION""">*/"_options = _options - [""radio""];"/*%FSM</ACTION""">*/;
  843. };
  844. /*%FSM</LINK>*/
  845. };
  846. };
  847. /*%FSM</STATE>*/
  848. /*%FSM<STATE "Going_somewhere">*/
  849. class Going_somewhere
  850. {
  851. name = "Going_somewhere";
  852. init = /*%FSM<STATEINIT""">*/"[_gOfficer, [[""retreat"", (getPosATL _officer), 2000]]] call AW_fnc_setBehaviour;"/*%FSM</STATEINIT""">*/;
  853. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  854. class Links
  855. {
  856. /*%FSM<LINK "Got_away___1000m">*/
  857. class Got_away___1000m
  858. {
  859. priority = 0.000000;
  860. to="FAIL_Lost_Office";
  861. precondition = /*%FSM<CONDPRECONDITION""">*/"_gotAway = true;" \n
  862. "{" \n
  863. " if ((_x distance _officer) < 1000) exitWith { _gotAway = false; };" \n
  864. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  865. condition=/*%FSM<CONDITION""">*/"_gotAway"/*%FSM</CONDITION""">*/;
  866. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  867. };
  868. /*%FSM</LINK>*/
  869. /*%FSM<LINK "Captured">*/
  870. class Captured
  871. {
  872. priority = 0.000000;
  873. to="Set_talk_action";
  874. precondition = /*%FSM<CONDPRECONDITION""">*/"_isCaptured = false;" \n
  875. "" \n
  876. "{" \n
  877. " if ((_x distance _officer) <= _captureDistance) then" \n
  878. " {" \n
  879. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  880. " if (_watching) exitWith { _isCaptured = true; _friendlyMan = _x; };" \n
  881. " };" \n
  882. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  883. condition=/*%FSM<CONDITION""">*/"_isCaptured"/*%FSM</CONDITION""">*/;
  884. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  885. };
  886. /*%FSM</LINK>*/
  887. /*%FSM<LINK "Dead">*/
  888. class Dead
  889. {
  890. priority = 0.000000;
  891. to="Wait_until_on_the";
  892. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  893. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  894. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  895. };
  896. /*%FSM</LINK>*/
  897. };
  898. };
  899. /*%FSM</STATE>*/
  900. /*%FSM<STATE "What_do__1">*/
  901. class What_do__1
  902. {
  903. name = "What_do__1";
  904. init = /*%FSM<STATEINIT""">*/"_chance = random 1;"/*%FSM</STATEINIT""">*/;
  905. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  906. class Links
  907. {
  908. /*%FSM<LINK "__Fuck_you____not">*/
  909. class __Fuck_you____not
  910. {
  911. priority = 2.000000;
  912. to="Add_action";
  913. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  914. condition=/*%FSM<CONDITION""">*/"(damage _officer) <= 0.1"/*%FSM</CONDITION""">*/;
  915. action=/*%FSM<ACTION""">*/"[""OPFOR_fuckYou"", _officer, 30] call AW_fnc_playSound;"/*%FSM</ACTION""">*/;
  916. };
  917. /*%FSM</LINK>*/
  918. /*%FSM<LINK "Shot_Papers__if">*/
  919. class Shot_Papers__if
  920. {
  921. priority = 1.000000;
  922. to="FAIL_Shot_Papers";
  923. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  924. condition=/*%FSM<CONDITION""">*/"((damage _officer) > 0.1) && _chance < 0.1"/*%FSM</CONDITION""">*/;
  925. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  926. };
  927. /*%FSM</LINK>*/
  928. /*%FSM<LINK "On_officer__more">*/
  929. class On_officer__more
  930. {
  931. priority = 0.000000;
  932. to="SUCCESS_Papers_on_1";
  933. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  934. condition=/*%FSM<CONDITION""">*/"(damage _officer) > 0.1"/*%FSM</CONDITION""">*/;
  935. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  936. };
  937. /*%FSM</LINK>*/
  938. };
  939. };
  940. /*%FSM</STATE>*/
  941. /*%FSM<STATE "FAIL_Shot_Papers">*/
  942. class FAIL_Shot_Papers
  943. {
  944. name = "FAIL_Shot_Papers";
  945. init = /*%FSM<STATEINIT""">*/"result = false;"/*%FSM</STATEINIT""">*/;
  946. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  947. class Links
  948. {
  949. };
  950. };
  951. /*%FSM</STATE>*/
  952. /*%FSM<STATE "FAIL_Lost_Office">*/
  953. class FAIL_Lost_Office
  954. {
  955. name = "FAIL_Lost_Office";
  956. init = /*%FSM<STATEINIT""">*/"result = false;"/*%FSM</STATEINIT""">*/;
  957. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  958. class Links
  959. {
  960. };
  961. };
  962. /*%FSM</STATE>*/
  963. /*%FSM<STATE "FAIL_Lost_Office_1">*/
  964. class FAIL_Lost_Office_1
  965. {
  966. name = "FAIL_Lost_Office_1";
  967. init = /*%FSM<STATEINIT""">*/"result = false;"/*%FSM</STATEINIT""">*/;
  968. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  969. class Links
  970. {
  971. };
  972. };
  973. /*%FSM</STATE>*/
  974. /*%FSM<STATE "Add_action">*/
  975. class Add_action
  976. {
  977. name = "Add_action";
  978. init = /*%FSM<STATEINIT""">*/"_talkedTo = false;" \n
  979. "_id = [];" \n
  980. "call compile format[""_id = [_officer, [""""Where are the papers?!"""", { [%1, """"_talkedTo"""", true] call AW_fnc_setFSMVariable; }]] call AW_fnc_createAction;"", _thisFSM];"/*%FSM</STATEINIT""">*/;
  981. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  982. class Links
  983. {
  984. /*%FSM<LINK "Dead">*/
  985. class Dead
  986. {
  987. priority = 4.000000;
  988. to="Wait_until_on_the";
  989. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  990. condition=/*%FSM<CONDITION""">*/"!alive _officer"/*%FSM</CONDITION""">*/;
  991. action=/*%FSM<ACTION""">*/"_id call AW_fnc_deleteAction;"/*%FSM</ACTION""">*/;
  992. };
  993. /*%FSM</LINK>*/
  994. /*%FSM<LINK "Units_more_than">*/
  995. class Units_more_than
  996. {
  997. priority = 3.000000;
  998. to="Where_ya_gonna_go";
  999. precondition = /*%FSM<CONDPRECONDITION""">*/"_shouldRun = true;" \n
  1000. "" \n
  1001. "{" \n
  1002. " if ((_x distance _officer) < 10) then" \n
  1003. " {" \n
  1004. " _watching = [_x, _officer, 0] call BIS_fnc_isInFrontOf;" \n
  1005. " if (_watching) exitWith { _shouldRun = false; }" \n
  1006. " };" \n
  1007. "} forEach playableUnits;"/*%FSM</CONDPRECONDITION""">*/;
  1008. condition=/*%FSM<CONDITION""">*/"_shouldRun"/*%FSM</CONDITION""">*/;
  1009. action=/*%FSM<ACTION""">*/"_officer enableAI ""ANIM"";" \n
  1010. "_id call AW_fnc_deleteAction;"/*%FSM</ACTION""">*/;
  1011. };
  1012. /*%FSM</LINK>*/
  1013. /*%FSM<LINK "Wait_for_action">*/
  1014. class Wait_for_action
  1015. {
  1016. priority = 0.000000;
  1017. to="What_do__1";
  1018. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  1019. condition=/*%FSM<CONDITION""">*/"_talkedTo"/*%FSM</CONDITION""">*/;
  1020. action=/*%FSM<ACTION""">*/"_id call AW_fnc_deleteAction;"/*%FSM</ACTION""">*/;
  1021. };
  1022. /*%FSM</LINK>*/
  1023. };
  1024. };
  1025. /*%FSM</STATE>*/
  1026. /*%FSM<STATE "Add_dead_marker">*/
  1027. class Add_dead_marker
  1028. {
  1029. name = "Add_dead_marker";
  1030. init = /*%FSM<STATEINIT""">*/"_missionUpdate = [" \n
  1031. " ""tactical"", " \n
  1032. " _code, " \n
  1033. " [" \n
  1034. " [""notification"", ""The officer has died! Check his body for the papers!""]," \n
  1035. " [""description"", ""The officer's died! Find and check his body for the papers.""]," \n
  1036. " [""marker"", ""Dead Officer""]," \n
  1037. " [""pos"", [(getPosATL _officer), 50] call AW_fnc_getFuzzyPos]" \n
  1038. " ]" \n
  1039. "] call AW_fnc_updateMission;"/*%FSM</STATEINIT""">*/;
  1040. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  1041. class Links
  1042. {
  1043. /*%FSM<LINK "And_to_the_actions">*/
  1044. class And_to_the_actions
  1045. {
  1046. priority = 0.000000;
  1047. to="Add_action_1";
  1048. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  1049. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  1050. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  1051. };
  1052. /*%FSM</LINK>*/
  1053. };
  1054. };
  1055. /*%FSM</STATE>*/
  1056. /*%FSM<STATE "Add_action_1">*/
  1057. class Add_action_1
  1058. {
  1059. name = "Add_action_1";
  1060. init = /*%FSM<STATEINIT""">*/"_searched = false;" \n
  1061. "_veh = if (typeOf (vehicle _officer) != ""NonSteerable_Parachute_F"") then { vehicle _officer } else { _officer };" \n
  1062. "call compile format[""[_veh, [""""Search for Papers"""", { [_this] call AW_fnc_deleteAction; [%1, """"_searched"""", true] call AW_fnc_setFSMVariable; }]] call AW_fnc_createAction;"", _thisFSM];"/*%FSM</STATEINIT""">*/;
  1063. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  1064. class Links
  1065. {
  1066. /*%FSM<LINK "Body___wreckage">*/
  1067. class Body___wreckage
  1068. {
  1069. priority = 0.000000;
  1070. to="FAIL_Well__fuck";
  1071. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  1072. condition=/*%FSM<CONDITION""">*/"isNull _officer"/*%FSM</CONDITION""">*/;
  1073. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  1074. };
  1075. /*%FSM</LINK>*/
  1076. /*%FSM<LINK "Wait_for_action">*/
  1077. class Wait_for_action
  1078. {
  1079. priority = 0.000000;
  1080. to="What_do_";
  1081. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  1082. condition=/*%FSM<CONDITION""">*/"_searched"/*%FSM</CONDITION""">*/;
  1083. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  1084. };
  1085. /*%FSM</LINK>*/
  1086. };
  1087. };
  1088. /*%FSM</STATE>*/
  1089. /*%FSM<STATE "Wait_for_it___">*/
  1090. class Wait_for_it___
  1091. {
  1092. name = "Wait_for_it___";
  1093. init = /*%FSM<STATEINIT""">*/"_timeout = time + 3;"/*%FSM</STATEINIT""">*/;
  1094. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  1095. class Links
  1096. {
  1097. /*%FSM<LINK "Open_dat__chute">*/
  1098. class Open_dat__chute
  1099. {
  1100. priority = 0.000000;
  1101. to="Wait_for_even_more";
  1102. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  1103. condition=/*%FSM<CONDITION""">*/"time >= _timeout"/*%FSM</CONDITION""">*/;
  1104. action=/*%FSM<ACTION""">*/"if (!(isTouchingGround _officer)) then" \n
  1105. "{" \n
  1106. " _chute = ""B_Parachute_02_F"" createVehicle (getPos _officer);" \n
  1107. " _chute setPosATL (getPosATL _officer);" \n
  1108. " _officer moveInDriver _chute;" \n
  1109. "" \n
  1110. " if (_rChance) then" \n
  1111. " {" \n
  1112. " {" \n
  1113. " _chute = ""NonSteerable_Parachute_F"" createVehicle (getPosATL _x);" \n
  1114. " _chute setPosATL (getPosATL _x);" \n
  1115. " _x moveInDriver _chute;" \n
  1116. " } foreach _crew;" \n
  1117. " };" \n
  1118. "};"/*%FSM</ACTION""">*/;
  1119. };
  1120. /*%FSM</LINK>*/
  1121. };
  1122. };
  1123. /*%FSM</STATE>*/
  1124. /*%FSM<STATE "FAIL_Well__fuck">*/
  1125. class FAIL_Well__fuck
  1126. {
  1127. name = "FAIL_Well__fuck";
  1128. init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
  1129. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  1130. class Links
  1131. {
  1132. };
  1133. };
  1134. /*%FSM</STATE>*/
  1135. /*%FSM<STATE "Wait_until_on_the">*/
  1136. class Wait_until_on_the
  1137. {
  1138. name = "Wait_until_on_the";
  1139. init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
  1140. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  1141. class Links
  1142. {
  1143. /*%FSM<LINK "On_the_floor">*/
  1144. class On_the_floor
  1145. {
  1146. priority = 0.000000;
  1147. to="Add_dead_marker";
  1148. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  1149. condition=/*%FSM<CONDITION""">*/"isTouchingGround _officer"/*%FSM</CONDITION""">*/;
  1150. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  1151. };
  1152. /*%FSM</LINK>*/
  1153. };
  1154. };
  1155. /*%FSM</STATE>*/
  1156. };
  1157. initState="Get_the_Message";
  1158. finalStates[] =
  1159. {
  1160. "FAIL_No_papers_on",
  1161. "FAIL_Officer_dead",
  1162. "SUCCESS_Papers_on",
  1163. "SUCCESS_Papers_on_1",
  1164. "FAIL_Papers_have",
  1165. "FAIL_Shot_Papers",
  1166. "FAIL_Lost_Office",
  1167. "FAIL_Lost_Office_1",
  1168. "FAIL_Well__fuck",
  1169. };
  1170. };
  1171. /*%FSM</COMPILE>*/