mission.fsm 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, Destroy Chopper">*/
  2. /*%FSM<HEAD>*/
  3. /*
  4. item0[] = {"Destroy_Chopper",0,4346,621.253113,530.210815,711.253113,580.210815,0.000000,"Destroy" \n "Chopper" \n "Side Mission"};
  5. item1[] = {"Here_we_go",8,218,622.421570,600.105347,712.421570,650.105347,0.000000,"Here we go"};
  6. item2[] = {"Chopper_destroye",4,218,620.305725,748.854797,710.305725,798.854797,0.000000,"Chopper" \n "destroyed"};
  7. item3[] = {"Mission_success",1,250,621.154541,831.196167,711.154541,881.196167,0.000000,"Mission" \n "success!"};
  8. item4[] = {"Create_Side_Miss",2,250,620.564209,675.335449,710.564209,725.335449,0.000000,"Create" \n "Side Mission"};
  9. link0[] = {0,1};
  10. link1[] = {1,4};
  11. link2[] = {2,3};
  12. link3[] = {4,2};
  13. globals[] = {0.000000,0,0,0,0,640,480,1,11,6316128,1,148.338150,1171.237793,1169.633911,389.312531,1205,920,1};
  14. window[] = {2,-1,-1,-1,-1,838,78,1518,78,3,1223};
  15. *//*%FSM</HEAD>*/
  16. class FSM
  17. {
  18. fsmName = "Destroy Chopper";
  19. class States
  20. {
  21. /*%FSM<STATE "Destroy_Chopper">*/
  22. class Destroy_Chopper
  23. {
  24. name = "Destroy_Chopper";
  25. init = /*%FSM<STATEINIT""">*/"_pos = _this; //REQUIRED! This is the position you've been given!"/*%FSM</STATEINIT""">*/;
  26. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  27. class Links
  28. {
  29. /*%FSM<LINK "Here_we_go">*/
  30. class Here_we_go
  31. {
  32. priority = 0.000000;
  33. to="Create_Side_Miss";
  34. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  35. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  36. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  37. };
  38. /*%FSM</LINK>*/
  39. };
  40. };
  41. /*%FSM</STATE>*/
  42. /*%FSM<STATE "Mission_success">*/
  43. class Mission_success
  44. {
  45. name = "Mission_success";
  46. init = /*%FSM<STATEINIT""">*/"_result = true;"/*%FSM</STATEINIT""">*/;
  47. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  48. class Links
  49. {
  50. };
  51. };
  52. /*%FSM</STATE>*/
  53. /*%FSM<STATE "Create_Side_Miss">*/
  54. class Create_Side_Miss
  55. {
  56. name = "Create_Side_Miss";
  57. init = /*%FSM<STATEINIT""">*/"_randomDir = (random 360);" \n
  58. "_hangar = ""Land_TentHangar_V1_F"" createVehicle _pos;" \n
  59. "_hangar setPos [(getPos _hangar select 0), (getPos _hangar select 1), ((getPos _hangar select 2) - 1)];" \n
  60. "_chopper = ""O_Heli_Light_02_F"" createVehicle _pos;" \n
  61. "{ _x setDir _randomDir; } forEach [_chopper, _hangar];" \n
  62. "_chopper setVehicleLock ""LOCKED"";" \n
  63. "" \n
  64. "_sideUnits = [EAST, 5, _pos, 300] call AW_fnc_spawnEnemy;" \n
  65. "[_sideUnits, [[""defend"", _pos, 150], [""patrol"", _pos, 300]]] call AW_fnc_setBehaviour;" \n
  66. ""/*%FSM</STATEINIT""">*/;
  67. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  68. class Links
  69. {
  70. /*%FSM<LINK "Chopper_destroye">*/
  71. class Chopper_destroye
  72. {
  73. priority = 0.000000;
  74. to="Mission_success";
  75. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  76. condition=/*%FSM<CONDITION""">*/"!alive _chopper"/*%FSM</CONDITION""">*/;
  77. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  78. };
  79. /*%FSM</LINK>*/
  80. };
  81. };
  82. /*%FSM</STATE>*/
  83. };
  84. initState="Destroy_Chopper";
  85. finalStates[] =
  86. {
  87. "Mission_success",
  88. };
  89. };
  90. /*%FSM</COMPILE>*/