mission.fsm 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, Example Mission">*/
  2. /*%FSM<HEAD>*/
  3. /*
  4. item0[] = {"Example_Side_Mission",0,4346,625.000000,525.000000,725.000000,575.000000,0.000000,"Example" \n "Side Mission" \n "Start"};
  5. item1[] = {"Let_s_go_",8,218,625.000000,600.000000,725.000000,650.000000,0.000000,"Let's go!"};
  6. item2[] = {"Hostage_dead__FA",4,218,550.000000,750.000000,650.000000,800.000000,0.000000,"Hostage dead?" \n "FAIL"};
  7. item3[] = {"End_the_Mission",1,250,625.000000,825.000000,725.000000,875.000000,0.000000,"End the" \n "Mission"};
  8. item4[] = {"Create_Side_Miss",2,250,625.000000,675.000000,725.000000,725.000000,0.000000,"Create" \n "Side Mission"};
  9. item5[] = {"Enemy_dead__SUCCEED",4,218,700.000000,750.000000,800.000000,800.000000,0.000000,"Enemy dead?" \n "SUCCEED!"};
  10. link0[] = {0,1};
  11. link1[] = {1,4};
  12. link2[] = {2,3};
  13. link3[] = {4,2};
  14. link4[] = {4,5};
  15. link5[] = {5,3};
  16. globals[] = {25.000000,1,0,0,0,640,480,1,13,6316128,1,148.338150,1171.237793,1169.633911,389.312531,1205,911,1};
  17. window[] = {2,-1,-1,-1,-1,835,75,1515,75,3,1223};
  18. *//*%FSM</HEAD>*/
  19. class FSM
  20. {
  21. fsmName = "Example Mission";
  22. class States
  23. {
  24. /*%FSM<STATE "Example_Side_Mission">*/
  25. class Example_Side_Mission
  26. {
  27. name = "Example_Side_Mission";
  28. init = /*%FSM<STATEINIT""">*/"_pos = _this select 0; //REQUIRED! This is the position you've been given!"/*%FSM</STATEINIT""">*/;
  29. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  30. class Links
  31. {
  32. /*%FSM<LINK "Let_s_go_">*/
  33. class Let_s_go_
  34. {
  35. priority = 0.000000;
  36. to="Create_Side_Miss";
  37. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  38. condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
  39. action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
  40. };
  41. /*%FSM</LINK>*/
  42. };
  43. };
  44. /*%FSM</STATE>*/
  45. /*%FSM<STATE "End_the_Mission">*/
  46. class End_the_Mission
  47. {
  48. name = "End_the_Mission";
  49. init = /*%FSM<STATEINIT""">*/"[_hostage, _enemy] call AW_fnc_collectGarbage;"/*%FSM</STATEINIT""">*/;
  50. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  51. class Links
  52. {
  53. };
  54. };
  55. /*%FSM</STATE>*/
  56. /*%FSM<STATE "Create_Side_Miss">*/
  57. class Create_Side_Miss
  58. {
  59. name = "Create_Side_Miss";
  60. init = /*%FSM<STATEINIT""">*/"//spawn 1 ""hostage""" \n
  61. "//spawn 1 ""enemy"""/*%FSM</STATEINIT""">*/;
  62. precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
  63. class Links
  64. {
  65. /*%FSM<LINK "Enemy_dead__SUCCEED">*/
  66. class Enemy_dead__SUCCEED
  67. {
  68. priority = 0.000000;
  69. to="End_the_Mission";
  70. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  71. condition=/*%FSM<CONDITION""">*/"!alive _enemy"/*%FSM</CONDITION""">*/;
  72. action=/*%FSM<ACTION""">*/"_result = true;"/*%FSM</ACTION""">*/;
  73. };
  74. /*%FSM</LINK>*/
  75. /*%FSM<LINK "Hostage_dead__FA">*/
  76. class Hostage_dead__FA
  77. {
  78. priority = 0.000000;
  79. to="End_the_Mission";
  80. precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
  81. condition=/*%FSM<CONDITION""">*/"!alive _hostage"/*%FSM</CONDITION""">*/;
  82. action=/*%FSM<ACTION""">*/"_result = false;"/*%FSM</ACTION""">*/;
  83. };
  84. /*%FSM</LINK>*/
  85. };
  86. };
  87. /*%FSM</STATE>*/
  88. };
  89. initState="Example_Side_Mission";
  90. finalStates[] =
  91. {
  92. "End_the_Mission",
  93. };
  94. };
  95. /*%FSM</COMPILE>*/