diff --git a/Sources/epoch_code/System/task_control.fsm b/Sources/epoch_code/System/task_control.fsm index 6608e305..f23aa88b 100644 --- a/Sources/epoch_code/System/task_control.fsm +++ b/Sources/epoch_code/System/task_control.fsm @@ -1,13 +1,222 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"task_control",0,250,-225.000000,-625.000000,-125.000000,-575.000000,0.000000,"task control"}; +item1[] = {"delay",4,218,-500.000000,-250.000000,-400.000000,-200.000000,0.000000,"delay"}; +item2[] = {"setup",2,250,-650.000000,-625.000000,-550.000000,-575.000000,0.000000,"setup"}; +item3[] = {"_",8,218,-500.000000,-625.000000,-400.000000,-575.000000,0.000000,""}; +item4[] = {"items_and_vars",2,250,-500.000000,-175.000000,-400.000000,-125.000000,0.000000,"items" \n "and" \n "vars"}; +item5[] = {"task_completed",4,218,300.000000,75.000000,400.000000,125.000000,15.000000,"task" \n "completed"}; +item6[] = {"end",1,250,-775.000000,350.000000,-675.000000,400.000000,0.000000,"end"}; +item7[] = {"no_item_spawn",4,218,-350.000000,-175.000000,-250.000000,-125.000000,0.000000,"no item spawn"}; +item8[] = {"do_monitor",2,250,-75.000000,-25.000000,25.000000,25.000000,0.000000," do monitor"}; +item9[] = {"next",2,250,300.000000,-25.000000,400.000000,25.000000,0.000000,"next"}; +item10[] = {"loop",4,218,75.000000,-25.000000,175.000000,25.000000,5.000000,"loop"}; +item11[] = {"_",8,218,-75.000000,-100.000000,25.000000,-50.000000,0.000000,""}; +item12[] = {"_",8,218,75.000000,-325.000000,175.000000,-275.000000,0.000000,""}; +item13[] = {"chat_conditions",2,250,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"chat conditions"}; +item14[] = {"event_conditions",2,250,300.000000,-325.000000,400.000000,-275.000000,0.000000,"event" \n "conditions"}; +item15[] = {"_",8,218,300.000000,-250.000000,400.000000,-200.000000,0.000000,""}; +item16[] = {"comms",2,250,-500.000000,-350.000000,-400.000000,-300.000000,0.000000,"comms"}; +item17[] = {"_",8,218,300.000000,-100.000000,400.000000,-50.000000,0.000000,""}; +item18[] = {"task_conditions",2,250,300.000000,-175.000000,400.000000,-125.000000,0.000000,"task" \n "conditions"}; +item19[] = {"chat_1",4,218,75.000000,-100.000000,175.000000,-50.000000,5.000000,"chat 1"}; +item20[] = {"chat_2",4,218,75.000000,-175.000000,175.000000,-125.000000,10.000000,"chat 2"}; +item21[] = {"chat_3",4,218,75.000000,-250.000000,175.000000,-200.000000,15.000000,"chat 3"}; +item22[] = {"item_spawn",4,218,-650.000000,-175.000000,-550.000000,-125.000000,5.000000,"item spawn"}; +item23[] = {"actions",2,250,-350.000000,-25.000000,-250.000000,25.000000,0.000000,"actions"}; +item24[] = {"point",4,218,-150.000000,350.000000,-50.000000,400.000000,0.000000,"point"}; +item25[] = {"spawn_item",2,250,-650.000000,-25.000000,-550.000000,25.000000,0.000000,"spawn item"}; +item26[] = {"ready",4,218,-500.000000,-25.000000,-400.000000,25.000000,0.000000,"ready"}; +item27[] = {"in_house",4,218,-775.000000,50.000000,-675.000000,100.000000,10.000000,"in house"}; +item28[] = {"hidden_nearby",4,218,-775.000000,-175.000000,-675.000000,-125.000000,5.000000,"hidden nearby"}; +item29[] = {"near_player",4,218,-775.000000,-25.000000,-675.000000,25.000000,15.000000,"near player"}; +item30[] = {"event_1",4,218,425.000000,-400.000000,525.000000,-350.000000,10.000000,"event 1"}; +item31[] = {"event_2",4,218,300.000000,-400.000000,400.000000,-350.000000,15.000000,"event 2"}; +item32[] = {"event_3",4,218,175.000000,-400.000000,275.000000,-350.000000,20.000000,"event 3"}; +item33[] = {"_",8,218,-650.000000,-400.000000,-550.000000,-350.000000,0.000000,""}; +item34[] = {"completed",2,250,175.000000,75.000000,275.000000,125.000000,0.000000,"completed"}; +item35[] = {"diag_1",4,218,300.000000,150.000000,400.000000,200.000000,15.000000,"diag 1"}; +item36[] = {"diag_2",4,218,175.000122,210.091980,275.000122,260.091980,10.000000,"diag 2"}; +item37[] = {"pause",4,218,300.000000,275.000000,400.000000,325.000000,0.000000,"pause"}; +item38[] = {"reward",2,250,25.000000,275.000000,125.000000,325.000000,0.000000,"reward"}; +item39[] = {"comms_1",2,250,-150.000000,425.000000,-50.000000,475.000000,0.000000,"comms"}; +item40[] = {"mission_complete",4,218,-650.000000,350.000000,-550.000000,400.000000,10.000000,"mission complete"}; +item41[] = {"_",8,218,25.000000,75.000000,125.000000,125.000000,0.000000,""}; +item42[] = {"_",8,218,-350.000000,100.000000,-250.000000,150.000000,0.000000,""}; +item43[] = {"markers",2,250,-225.000000,175.000000,-125.000000,225.000000,0.000000,"markers"}; +item44[] = {"continue",4,218,-75.000000,175.000000,25.000000,225.000000,100.000000,"continue"}; +item45[] = {"radius",4,4314,-300.000000,350.000000,-200.000000,400.000000,0.000000,"radius"}; +item46[] = {"marker_pos",4,218,-350.000000,225.000000,-250.000000,275.000000,0.000000,"marker pos"}; +item47[] = {"do_markers",2,250,-225.000000,275.000000,-125.000000,325.000000,0.000000,"do markers"}; +item48[] = {"find_spot",2,250,-900.000000,-175.000000,-800.000000,-125.000000,0.000000,"find spot"}; +item49[] = {"task_failed",4,218,450.000000,-25.000000,550.000000,25.000000,10.000000,"task" \n "failed"}; +item50[] = {"failed",2,250,450.000000,75.000000,550.000000,125.000000,0.000000,"failed"}; +item51[] = {"diag",4,218,575.000000,-25.000000,675.000000,25.000000,5.000000,"diag"}; +item52[] = {"fsm",4,218,575.000000,75.000000,675.000000,125.000000,10.000000,"fsm"}; +item53[] = {"sqf",4,218,575.000000,150.000000,675.000000,200.000000,15.000000,"sqf"}; +item54[] = {"call",4,218,575.000000,225.000000,675.000000,275.000000,20.000000,"call"}; +item55[] = {"clean_up",2,250,300.000000,425.000000,400.000000,475.000000,0.000000,"clean up"}; +item56[] = {"_",8,218,25.000000,425.000000,125.000000,475.000000,0.000000,""}; +item57[] = {"markers",4,218,525.000000,350.000000,625.000000,400.000000,5.000000,"markers"}; +item58[] = {"fsm",4,218,-225.000000,-100.000000,-125.000000,-50.000000,15.000000,"fsm"}; +item59[] = {"sqf",4,218,-225.000000,-25.000000,-125.000000,25.000000,10.000000,"sqf"}; +item60[] = {"call",4,218,-225.000000,50.000000,-125.000000,100.000000,20.000000,"call"}; +item61[] = {"not_hidden",4,218,-900.000000,-100.000000,-800.000000,-50.000000,10.000000,"not hidden"}; +item62[] = {"is_hidden",4,218,-775.000000,-100.000000,-675.000000,-50.000000,5.000000,"is hidden"}; +item63[] = {"gui",2,250,-775.000000,-250.000000,-675.000000,-200.000000,0.000000,"gui"}; +item64[] = {"no_dialogoue",4,218,-650.000000,-250.000000,-550.000000,-200.000000,10.000000,"no dialogoue"}; +item65[] = {"dialogue",4,218,-900.000000,-250.000000,-800.000000,-200.000000,5.000000,"dialogue"}; +item66[] = {"remind_dialogue",4,218,200.000000,350.000000,300.000000,400.000000,10.000000,"remind" \n "dialogue"}; +item67[] = {"_",8,218,-300.000000,425.000000,-200.000000,475.000000,0.000000,""}; +item68[] = {"next_task",2,250,-500.000000,425.000000,-400.000000,475.000000,0.000000,"next task"}; +item69[] = {"clean_up",4,218,400.000000,350.000000,500.000000,400.000000,15.000000,"clean up"}; +item70[] = {"comms_2",2,250,-75.000000,-325.000000,25.000000,-275.000000,0.000000,"comms"}; +item71[] = {"server",4,218,-75.000000,-250.000000,25.000000,-200.000000,10.000000,"server"}; +item72[] = {"simple_task",4,218,-225.000000,-450.000000,-125.000000,-400.000000,10.000000,"simple" \n "task"}; +item73[] = {"skip",4,218,-500.000000,225.000000,-400.000000,275.000000,5.000000,"skip"}; +item74[] = {"run_test",4,218,-500.000000,-525.000000,-400.000000,-475.000000,20.000000,"run test"}; +item75[] = {"override_for_task",2,250,-500.000000,-450.000000,-400.000000,-400.000000,0.000000,"override for" \n "task Editor"}; +item76[] = {"bin_it",4,218,425.000000,-325.000000,525.000000,-275.000000,5.000000,"bin it"}; +item77[] = {"",7,210,708.500000,-141.500000,716.500000,-133.500000,0.000000,""}; +item78[] = {"",7,210,708.500000,446.000000,716.500000,454.000000,0.000000,""}; +item79[] = {"next_task",4,218,-650.000000,425.000000,-550.000000,475.000000,5.000000,"next task"}; +item80[] = {"",7,210,-929.000000,446.000000,-921.000000,454.000000,0.000000,""}; +item81[] = {"",7,210,-929.000000,-604.000000,-921.000000,-596.000000,0.000000,""}; +item82[] = {"call",4,218,103.990662,149.799805,193.990662,199.799805,5.000000,"call"}; +link0[] = {0,3}; +link1[] = {1,4}; +link2[] = {2,33}; +link3[] = {2,72}; +link4[] = {2,74}; +link5[] = {3,2}; +link6[] = {4,7}; +link7[] = {4,22}; +link8[] = {5,34}; +link9[] = {7,23}; +link10[] = {8,11}; +link11[] = {9,5}; +link12[] = {9,10}; +link13[] = {9,49}; +link14[] = {10,8}; +link15[] = {11,13}; +link16[] = {12,14}; +link17[] = {13,12}; +link18[] = {13,19}; +link19[] = {13,20}; +link20[] = {13,21}; +link21[] = {13,71}; +link22[] = {14,15}; +link23[] = {14,30}; +link24[] = {14,31}; +link25[] = {14,32}; +link26[] = {14,76}; +link27[] = {15,18}; +link28[] = {16,1}; +link29[] = {17,9}; +link30[] = {18,17}; +link31[] = {19,13}; +link32[] = {20,13}; +link33[] = {21,13}; +link34[] = {22,25}; +link35[] = {23,42}; +link36[] = {23,58}; +link37[] = {23,59}; +link38[] = {23,60}; +link39[] = {23,73}; +link40[] = {24,47}; +link41[] = {25,26}; +link42[] = {25,27}; +link43[] = {25,28}; +link44[] = {25,29}; +link45[] = {26,23}; +link46[] = {27,25}; +link47[] = {28,48}; +link48[] = {29,25}; +link49[] = {30,14}; +link50[] = {31,14}; +link51[] = {32,14}; +link52[] = {33,16}; +link53[] = {34,35}; +link54[] = {34,36}; +link55[] = {34,41}; +link56[] = {34,82}; +link57[] = {35,34}; +link58[] = {36,34}; +link59[] = {37,55}; +link60[] = {38,37}; +link61[] = {39,67}; +link62[] = {40,6}; +link63[] = {41,38}; +link64[] = {42,43}; +link65[] = {43,44}; +link66[] = {43,46}; +link67[] = {44,8}; +link68[] = {45,47}; +link69[] = {46,47}; +link70[] = {47,24}; +link71[] = {47,44}; +link72[] = {47,45}; +link73[] = {48,61}; +link74[] = {48,62}; +link75[] = {49,50}; +link76[] = {50,37}; +link77[] = {50,51}; +link78[] = {50,52}; +link79[] = {50,53}; +link80[] = {50,54}; +link81[] = {51,50}; +link82[] = {52,50}; +link83[] = {53,50}; +link84[] = {54,50}; +link85[] = {55,56}; +link86[] = {55,57}; +link87[] = {55,66}; +link88[] = {55,69}; +link89[] = {56,39}; +link90[] = {57,55}; +link91[] = {58,23}; +link92[] = {59,23}; +link93[] = {60,23}; +link94[] = {61,48}; +link95[] = {62,25}; +link96[] = {63,64}; +link97[] = {63,65}; +link98[] = {64,4}; +link99[] = {65,63}; +link100[] = {66,55}; +link101[] = {67,68}; +link102[] = {68,40}; +link103[] = {68,79}; +link104[] = {69,55}; +link105[] = {70,12}; +link106[] = {71,70}; +link107[] = {72,23}; +link108[] = {73,68}; +link109[] = {74,75}; +link110[] = {75,33}; +link111[] = {75,72}; +link112[] = {76,77}; +link113[] = {77,78}; +link114[] = {78,55}; +link115[] = {79,80}; +link116[] = {80,81}; +link117[] = {81,2}; +link118[] = {82,34}; +globals[] = {0.000000,0,0,0,0,640,480,1,402,6316128,1,-373.223206,667.163940,461.114258,-479.323029,397,828,1}; +window[] = {2,-1,-1,-1,-1,629,2024,3049,104,3,415}; +*//*%FSM*/ class FSM { fsmName = "task control client"; class States { + /*%FSM*/ class task_control { name = "task_control"; itemno = 0; - init = "_plyr = player;" \n + init = /*%FSM*/"_plyr = player;" \n "_taskName = _this select 0;" \n "_unit = objNull;" \n "_taskItem = objNull;" \n @@ -34,7 +243,7 @@ class FSM "_plyrArr = [""Epoch_Man_Base_F"",""Epoch_Female_base_F""];" \n "_config = 'inGameTasks' call EPOCH_returnConfig;" \n "_scriptPath = getText ( _config >> ""file"");" \n - "_fsmPath = getText ( _config >> ""fsmpath"");" \n + "_fsmPath = ""epoch_code\system"";" \n "_filterBuilds = getArray ( _config >> ""filterBuilds"");" \n "" \n "//DECLARE" \n @@ -42,37 +251,41 @@ class FSM "" \n "" \n "" \n - ""; - precondition = ""; + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class _ { itemno = 3; priority = 0.000000; to="setup"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class setup { name = "setup"; itemno = 2; - init = "" \n + init = /*%FSM*/"" \n "//_config = missionConfigFile;" \n "" \n "//Mission Control - WIP. TODO: Move to serverside mission control UINamespace not secure." \n "//uiNameSpace setVariable [""axeTask"",_taskName];" \n - "_plyrVar = missionNamespace getVariable [""EPOCH_playerMissionArray"",[]];" \n + "_plyrVar = player getVariable [""SERVER_VARS"",[]];" \n "_taskIndex = ((_plyrVar apply {_x find ""axeTask"" > -1;}) find true);" \n "if(_taskIndex > -1)then{" \n "_plyrVar deleteAt _taskIndex;" \n "};" \n "_plyrVar pushBack [""axeTask"",_taskName];" \n - "missionNamespace setVariable [""EPOCH_playerMissionArray"",_plyrVar];" \n + "player setVariable [""SERVER_VARS"",_plyrVar,true];" \n "" \n "missionNameSpace setVariable [""axeTask"",_taskName];" \n "" \n @@ -119,6 +332,7 @@ class FSM "_taskMarkerType = getNumber ( _config >> _taskName >> ""markerType"");" \n "_taskMarkerRad = getNumber ( _config >> _taskName >> ""markerRadius"");" \n "_taskMarkerText = getText ( _config >> _taskName >> ""markerText"");" \n + "_taskMarkerVis = getNumber ( _config >> _taskName >> ""markerVisible"");" \n "_taskDiagSquelch = getNumber ( _config >> _taskName >> ""diagSquelch"");" \n "_lastChat = diag_tickTime;" \n "_taskDiagCond1 = compile getText ( _config >> _taskName >> ""diag1Condition"");" \n @@ -199,81 +413,95 @@ class FSM "_debugDo = ""INIT"";" \n "_showDebug = {" \n "//hint format [""%4\n%1\nStage: %2\nMsg: %3\nTask: %4"", _debugDo,_missionStage,_msg1,_missionName,_taskTitle];" \n - "};"; - precondition = ""; + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class run_test { itemno = 74; priority = 20.000000; to="override_for_task"; - precondition = ""; - condition="_editorTest"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_editorTest"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class simple_task { itemno = 72; priority = 10.000000; to="actions"; - precondition = ""; - condition="_taskSimple > 0;"; - action="_doSkip = true;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskSimple > 0;"/*%FSM*/; + action=/*%FSM*/"_doSkip = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 33; priority = 0.000000; to="comms"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class items_and_vars { name = "items_and_vars"; itemno = 4; - init = "//SystemChat format [""START: Do Spawn: %1"",_taskItemSpawn];" \n + init = /*%FSM*/"//SystemChat format [""START: Do Spawn: %1"",_taskItemSpawn];" \n "_taskStartPos = getPosATL _plyr;" \n - "_startTime = diag_tickTime;"; - precondition = ""; + "_startTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class item_spawn { itemno = 22; priority = 5.000000; to="spawn_item"; - precondition = ""; - condition="_taskItemSpawn > 0 && count _taskItems > 0"; - action="_taskItem = objNull;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskItemSpawn > 0 && count _taskItems > 0"/*%FSM*/; + action=/*%FSM*/"_taskItem = objNull;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class no_item_spawn { itemno = 7; priority = 0.000000; to="actions"; - precondition = ""; - condition="_taskItemSpawn < 1"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskItemSpawn < 1"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class end { name = "end"; itemno = 6; - init = "//uiNameSpace setVariable [""axeTask"",nil];" \n + init = /*%FSM*/"//uiNameSpace setVariable [""axeTask"",nil];" \n "if!(_doBin)then{" \n - "_plyrVar = missionNamespace getVariable [""EPOCH_playerMissionArray"",[]];" \n + "_plyrVar = player getVariable [""SERVER_VARS"",[]];" \n "_taskIndex = ((_plyrVar apply {_x find ""axeTask"" > -1;}) find true);" \n "if(_taskIndex > -1)then{" \n "_plyrVar deleteAt _taskIndex;" \n "};" \n - "missionNamespace setVariable [""EPOCH_playerMissionArray"",_plyrVar];" \n + "player setVariable [""SERVER_VARS"",_plyrVar,true];" \n "};" \n "if(count _missionCleanUp > 0)then{" \n "{" \n @@ -281,58 +509,67 @@ class FSM "} forEach _missionCleanUp;" \n "};" \n "_debugDo = ""DISPOSE"";" \n - "diag_log format [""Task Failed: %1"",_taskName];"; - precondition = ""; + "diag_log format [""Task Failed: %1"",_taskName];"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; + /*%FSM*/ + /*%FSM*/ class do_monitor { name = "do_monitor"; itemno = 8; - init = "_lastLoop = diag_tickTime;" \n + init = /*%FSM*/"_lastLoop = diag_tickTime;" \n "EPOCH_taskLastLoop = _lastLoop;" \n - "_plyPos = getPosATL _plyr;"; - precondition = ""; + "_plyPos = getPosATL _plyr;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class _ { itemno = 11; priority = 0.000000; to="chat_conditions"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class next { name = "next"; itemno = 9; - init = "//Clean Up / Other Options here"; - precondition = ""; + init = /*%FSM*/"//Clean Up / Other Options here"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class task_completed { itemno = 5; priority = 15.000000; to="completed"; - precondition = ""; - condition="_completed && diag_tickTime - _lastLoop > _taskCheckTime"; - action="_lastLoop = diag_tickTime;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_completed && diag_tickTime - _lastLoop > _taskCheckTime"/*%FSM*/; + action=/*%FSM*/"_lastLoop = diag_tickTime;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class task_failed { itemno = 49; priority = 10.000000; to="failed"; - precondition = ""; - condition="_taskFailed"; - action="_taskFailedDiag = [];" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskFailed"/*%FSM*/; + action=/*%FSM*/"_taskFailedDiag = [];" \n "_taskFailedFSM = """";" \n "_taskFailedSQF = """";" \n "_taskFailedCall = compile """";" \n @@ -351,102 +588,120 @@ class FSM "_nextTask = parseText axeValCacheList select 45;" \n "};" \n "" \n - "_taskReminder = [];"; + "_taskReminder = [];"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class loop { itemno = 10; priority = 5.000000; to="do_monitor"; - precondition = ""; - condition="((!_completed) || (!_taskFailed)) && diag_tickTime - _lastLoop > _taskCheckTime"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((!_completed) || (!_taskFailed)) && diag_tickTime - _lastLoop > _taskCheckTime"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class chat_conditions { name = "chat_conditions"; itemno = 13; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class chat_3 { itemno = 21; priority = 15.000000; to="chat_conditions"; - precondition = ""; - condition="diag_tickTime - _lastChat > _taskDiagSquelch && call _taskDiagCond3 && count _taskDiag3 > 0"; - action="_diag = selectRandom _taskDiag3;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"diag_tickTime - _lastChat > _taskDiagSquelch && call _taskDiagCond3 && count _taskDiag3 > 0"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskDiag3;" \n "" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n "" \n "" \n "_chat3Done = true;" \n - "_lastChat = diag_tickTime;"; + "_lastChat = diag_tickTime;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class chat_2 { itemno = 20; priority = 10.000000; to="chat_conditions"; - precondition = ""; - condition="diag_tickTime - _lastChat > _taskDiagSquelch && call _taskDiagCond2 && count _taskDiag2 > 0"; - action="_diag = selectRandom _taskDiag2;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"diag_tickTime - _lastChat > _taskDiagSquelch && call _taskDiagCond2 && count _taskDiag2 > 0"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskDiag2;" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n "_chat2Done = true;" \n - "_lastChat = diag_tickTime;"; + "_lastChat = diag_tickTime;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class server { itemno = 71; priority = 10.000000; to="comms_2"; - precondition = ""; - condition="count _serverCmd > 0"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"count _serverCmd > 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class chat_1 { itemno = 19; priority = 5.000000; to="chat_conditions"; - precondition = ""; - condition="(!_chat1Done) && call _taskDiagCond1 && count _taskDiag1 > 0"; - action="_diag = selectRandom _taskDiag1;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(!_chat1Done) && call _taskDiagCond1 && count _taskDiag1 > 0"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskDiag1;" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n "_chat1Done = true;" \n - "_lastChat = diag_tickTime;"; + "_lastChat = diag_tickTime;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 12; priority = 0.000000; to="event_conditions"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class event_conditions { name = "event_conditions"; itemno = 14; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class event_3 { itemno = 32; priority = 20.000000; to="event_conditions"; - precondition = ""; - condition="(!_event3Done) && call _taskEventCond3"; - action="if!(_taskEventFSM3 == """")then{" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(!_event3Done) && call _taskEventCond3"/*%FSM*/; + action=/*%FSM*/"if!(_taskEventFSM3 == """")then{" \n "_taskEventFSM3 call _execFSM;" \n "};" \n "" \n @@ -467,16 +722,18 @@ class FSM "" \n "};" \n "" \n - "_event3Done = true;"; + "_event3Done = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class event_2 { itemno = 31; priority = 15.000000; to="event_conditions"; - precondition = ""; - condition="(!_event2Done) && call _taskEventCond2"; - action="if!(_taskEventFSM2 == """")then{" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(!_event2Done) && call _taskEventCond2"/*%FSM*/; + action=/*%FSM*/"if!(_taskEventFSM2 == """")then{" \n "_taskEventFSM2 call _execFSM;" \n "};" \n "" \n @@ -497,16 +754,18 @@ class FSM "" \n "};" \n "" \n - "_event2Done = true;"; + "_event2Done = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class event_1 { itemno = 30; priority = 10.000000; to="event_conditions"; - precondition = ""; - condition="(!_event1Done) && call _taskEventCond1"; - action="if!(_taskEventFSM1 == """")then{" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(!_event1Done) && call _taskEventCond1"/*%FSM*/; + action=/*%FSM*/"if!(_taskEventFSM1 == """")then{" \n "_taskEventFSM1 call _execFSM;" \n "};" \n "" \n @@ -528,160 +787,190 @@ class FSM "" \n "};" \n "" \n - "_event1Done = true;"; + "_event1Done = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class bin_it { itemno = 76; priority = 5.000000; to="clean_up"; - precondition = ""; - condition="_doBin"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_doBin"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 15; priority = 0.000000; to="task_conditions"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class comms { name = "comms"; itemno = 16; - init = "//[_plyr,0,_taskID] remoteExec [""EPOCH_Server_missionComms"",3];"; - precondition = ""; + init = /*%FSM*/"//[_plyr,0,_taskID] remoteExec [""EPOCH_Server_missionComms"",3];"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class delay { itemno = 1; priority = 0.000000; to="items_and_vars"; - precondition = ""; - condition="diag_tickTime > _startTime + _taskDelay"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"diag_tickTime > _startTime + _taskDelay"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class task_conditions { name = "task_conditions"; itemno = 18; - init = "if((_plyPos distance _taskStartPos > _taskFailDist) || (diag_tickTIme - _startTime > _taskFailTime) || (call _taskFailedCond))then{" \n + init = /*%FSM*/"if((_plyPos distance _taskStartPos > _taskFailDist) || (diag_tickTIme - _startTime > _taskFailTime) || (call _taskFailedCond))then{" \n "_taskFailed = true;" \n "};" \n "" \n "if(call _taskCompleteCond)then{" \n "_completed = true;" \n - "};"; - precondition = ""; + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class _ { itemno = 17; priority = 0.000000; to="next"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class actions { name = "actions"; itemno = 23; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class call { itemno = 60; priority = 20.000000; to="actions"; - precondition = ""; - condition="!(_taskCall == """")" \n - "//USE isNill NOT == """""; - action="call compile _taskCall;" \n - "_taskCall = """";"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(_taskCall == """")" \n + "//USE isNill NOT == """""/*%FSM*/; + action=/*%FSM*/"call compile _taskCall;" \n + "_taskCall = """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class fsm { itemno = 58; priority = 15.000000; to="actions"; - precondition = ""; - condition="!(_taskFSM == """")"; - action="_taskFSM call _execFSM;" \n - "_taskFSM = """";"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(_taskFSM == """")"/*%FSM*/; + action=/*%FSM*/"_taskFSM call _execFSM;" \n + "_taskFSM = """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class sqf { itemno = 59; priority = 10.000000; to="actions"; - precondition = ""; - condition="!(_taskSQF == """")"; - action="systemChat ""SQF NOT NIL"";" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(_taskSQF == """")"/*%FSM*/; + action=/*%FSM*/"systemChat ""SQF NOT NIL"";" \n "_taskSQF call _execSQF;" \n - "_taskSQF = """";"; + "_taskSQF = """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class skip { itemno = 73; priority = 5.000000; to="next_task"; - precondition = ""; - condition="_doSkip"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_doSkip"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 42; priority = 0.000000; to="markers"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class spawn_item { name = "spawn_item"; itemno = 25; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class near_player { itemno = 29; priority = 15.000000; to="spawn_item"; - precondition = ""; - condition="_taskItemSpawn == 3"; - action="_pos = getPosATL player;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskItemSpawn == 3"/*%FSM*/; + action=/*%FSM*/"_pos = getPosATL player;" \n "_taskItem = [_pos] call _spawnWH;" \n "_taskItemSpawn = -1;" \n - ""; + ""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class in_house { itemno = 27; priority = 10.000000; to="spawn_item"; - precondition = ""; - condition="_taskItemSpawn == 1"; - action="_nrBuilds = nearestObjects [_plyr,[""house""],50];" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskItemSpawn == 1"/*%FSM*/; + action=/*%FSM*/"_nrBuilds = nearestObjects [_plyr,[""house""],50];" \n "_arrGarr = [];" \n "_bldMap = [];" \n "_pos = getPosATL _plyr;" \n @@ -723,87 +1012,104 @@ class FSM "_taskItem = [_pos] call _spawnWH;" \n "" \n "" \n - "_taskItemSpawn = -1;"; + "_taskItemSpawn = -1;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class hidden_nearby { itemno = 28; priority = 5.000000; to="find_spot"; - precondition = ""; - condition="_taskItemSpawn == 2"; - action="_taskItemSpawn = -1;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskItemSpawn == 2"/*%FSM*/; + action=/*%FSM*/"_taskItemSpawn = -1;" \n "_posSafe = false;" \n - "_done = false;"; + "_done = false;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class ready { itemno = 26; priority = 0.000000; to="actions"; - precondition = ""; - condition="!isNull _taskItem"; - action="[player,Epoch_personalToken,_taskItems,[],_taskItem,false] remoteExec [""EPOCH_Server_createObject"",2];" \n - "EPOCH_taskItem = _taskItem;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNull _taskItem"/*%FSM*/; + action=/*%FSM*/"[player,Epoch_personalToken,_taskItems,[],_taskItem,false] remoteExec [""EPOCH_Server_createObject"",2];" \n + "EPOCH_taskItem = _taskItem;"/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class completed { name = "completed"; itemno = 34; - init = "//Put more checks in for empty dialogue array so as not just waiting a set time"; - precondition = ""; + init = /*%FSM*/"//Put more checks in for empty dialogue array so as not just waiting a set time"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class diag_1 { itemno = 35; priority = 15.000000; to="completed"; - precondition = ""; - condition="!_diag1Done && count _taskCompleteDiag1 > 0"; - action="_diag = selectRandom _taskCompleteDiag1;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!_diag1Done && count _taskCompleteDiag1 > 0"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskCompleteDiag1;" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n - "_diag1Done = true;"; + "_diag1Done = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class diag_2 { itemno = 36; priority = 10.000000; to="completed"; - precondition = ""; - condition="_diag1Done && (!_diag2Done) && diag_tickTime - _lastLoop > 20 && count _taskCompleteDiag2 > 0"; - action="_diag = selectRandom _taskCompleteDiag2;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_diag1Done && (!_diag2Done) && diag_tickTime - _lastLoop > 20 && count _taskCompleteDiag2 > 0"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskCompleteDiag2;" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n - "_diag2Done = true;"; + "_diag2Done = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class call { itemno = 82; priority = 5.000000; to="completed"; - precondition = ""; - condition="!(str(_taskCompleteCall) == ""{}"")"; - action="call _taskCompleteCall;" \n - "_taskCompleteCall = compile """";"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(str(_taskCompleteCall) == ""{}"")"/*%FSM*/; + action=/*%FSM*/"call _taskCompleteCall;" \n + "_taskCompleteCall = compile """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 41; priority = 0.000000; to="reward"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class reward { name = "reward"; itemno = 38; - init = "if(count _taskReward > 0)then{" \n + init = /*%FSM*/"if(count _taskReward > 0)then{" \n "" \n "diag_log format [""spawn reward: %1"",_taskReward];" \n "" \n @@ -813,66 +1119,77 @@ class FSM "" \n "};" \n "" \n - "_debugDo = ""REWARD"";"; - precondition = ""; + "_debugDo = ""REWARD"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class pause { itemno = 37; priority = 0.000000; to="clean_up"; - precondition = ""; - condition="diag_tickTime - _lastLoop > _taskCheckTime"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"diag_tickTime - _lastLoop > _taskCheckTime"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class comms_1 { name = "comms_1"; itemno = 39; - init = "//[_plyr,1,_taskID] remoteExec [""EPOCH_Server_missionComms"",3];"; - precondition = ""; + init = /*%FSM*/"//[_plyr,1,_taskID] remoteExec [""EPOCH_Server_missionComms"",3];"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class _ { itemno = 67; priority = 0.000000; to="next_task"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class markers { name = "markers"; itemno = 43; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class continue { itemno = 44; priority = 100.000000; to="do_monitor"; - precondition = ""; - condition="//no marker" \n - "_taskMarkerType < 1"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"//no marker" \n + "_taskMarkerType < 1"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class marker_pos { itemno = 46; priority = 0.000000; to="do_markers"; - precondition = ""; - condition="_taskMarkerType > 0"; - action="_markerPos = [];" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskMarkerType > 0"/*%FSM*/; + action=/*%FSM*/"_markerPos = [];" \n "if(isNil ""EPOCH_taskMarkerPos"")then{" \n "if!(isNull _trgt)then{" \n "_markerPos = getPos _trgt;" \n @@ -901,59 +1218,66 @@ class FSM "};" \n "" \n "" \n - ""; + ""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class do_markers { name = "do_markers"; itemno = 47; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class continue { itemno = 44; priority = 100.000000; to="do_monitor"; - precondition = ""; - condition="//no marker" \n - "_taskMarkerType < 1"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"//no marker" \n + "_taskMarkerType < 1"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class radius { itemno = 45; priority = 0.000000; to="do_markers"; - precondition = ""; - condition="_taskMarkerType == 2"; - action="" \n - "[player, _markerPos, ""ELLIPSE"", ""mil_dot"", ""ColorYellow"", [_taskMarkerRad,_taskMarkerRad], ""SolidBorder"", 42, _markerText, 0.6,_mkrName] call EPOCH_fnc_createMarker;" \n - "" \n - "_taskMarkerType = -1;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskMarkerType == 2"/*%FSM*/; + action=/*%FSM*/"[[_taskMarkerVis,player],_markerPos,""ELLIPSE"",""mil_dot"",_markerText,""ColorYellow"",[_taskMarkerRad,_taskMarkerRad], ""SolidBorder"", 42, 0.6,_taskTitle] remoteExec [""EPOCH_server_makeMarker"",2];" \n + "_taskMarkerType = -1;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class point { itemno = 24; priority = 0.000000; to="do_markers"; - precondition = ""; - condition="_taskMarkerType == 1"; - action="" \n - "[player, _markerPos, ""ICON"", ""mil_dot"", ""ColorYellow"", [0.8,0.8], """", 42, _markerText, 0.6, _mkrName] call EPOCH_fnc_createMarker;" \n - "" \n - "_taskMarkerType = -1;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskMarkerType == 1"/*%FSM*/; + action=/*%FSM*/"[[_taskMarkerVis,player],_markerPos,""ICON"",""mil_dot"",_markerText,""ColorYellow"",[0.8,0.8], ""SolidBorder"", 42, 0.6,_taskTitle] remoteExec [""EPOCH_server_makeMarker"",2];" \n + "_taskMarkerType = -1;"/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class find_spot { name = "find_spot"; itemno = 48; - init = "//TODO: try catch used incorrectly here" \n + init = /*%FSM*/"//TODO: try catch used incorrectly here" \n "try{" \n "_pos = [(getPosATL _plyr), (floor (random 80) + 42), floor random 360] call BIS_fnc_relPos;" \n "" \n @@ -970,233 +1294,277 @@ class FSM "systemchat format[""CATCH:%1"",_exception];" \n "done = true;" \n "_taskItemSpawn = 1;" \n - "};"; - precondition = ""; + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class not_hidden { itemno = 61; priority = 10.000000; to="find_spot"; - precondition = ""; - condition="!_posSafe;"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!_posSafe;"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class is_hidden { itemno = 62; priority = 5.000000; to="spawn_item"; - precondition = ""; - condition="_done;"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_done;"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class failed { name = "failed"; itemno = 50; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class call { itemno = 54; priority = 20.000000; to="failed"; - precondition = ""; - condition="!(str(_taskFailedCall) == ""{}"")"; - action="call _taskFailedCall;" \n - "_taskFailedCall = compile """";"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(str(_taskFailedCall) == ""{}"")"/*%FSM*/; + action=/*%FSM*/"call _taskFailedCall;" \n + "_taskFailedCall = compile """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class sqf { itemno = 53; priority = 15.000000; to="failed"; - precondition = ""; - condition="!(_taskFailedSQF == """")"; - action="_taskFailedSQF call _execSQF;" \n - "_taskFailedSQF = """";"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(_taskFailedSQF == """")"/*%FSM*/; + action=/*%FSM*/"_taskFailedSQF call _execSQF;" \n + "_taskFailedSQF = """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class fsm { itemno = 52; priority = 10.000000; to="failed"; - precondition = ""; - condition="!(_taskFailedFSM == """")"; - action="_taskFailedFSM call _execFSM;" \n - "_taskFailedFSM = """";"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(_taskFailedFSM == """")"/*%FSM*/; + action=/*%FSM*/"_taskFailedFSM call _execFSM;" \n + "_taskFailedFSM = """";"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class diag { itemno = 51; priority = 5.000000; to="failed"; - precondition = ""; - condition="count _taskFailedDiag > 0"; - action="_diag = selectRandom _taskFailedDiag;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"count _taskFailedDiag > 0"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskFailedDiag;" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n - "_taskFailedDiag = [];"; + "_taskFailedDiag = [];"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class pause { itemno = 37; priority = 0.000000; to="clean_up"; - precondition = ""; - condition="diag_tickTime - _lastLoop > _taskCheckTime"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"diag_tickTime - _lastLoop > _taskCheckTime"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class clean_up { name = "clean_up"; itemno = 55; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class clean_up { itemno = 69; priority = 15.000000; to="clean_up"; - precondition = ""; - condition="_taskCleanup > 0"; - action="//deleteVehicle _taskItem;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskCleanup > 0"/*%FSM*/; + action=/*%FSM*/"//deleteVehicle _taskItem;" \n "//[_plyr,0,_taskID,_taskItem] remoteExec [""EPOCH_Server_missionComms"",3];" \n - "_taskCleanup = -1;"; + "_taskCleanup = -1;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class remind_dialogue { itemno = 66; priority = 10.000000; to="clean_up"; - precondition = ""; - condition="count _taskReminder > 0 && !_taskFailed"; - action="_diag = selectRandom _taskReminder;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"count _taskReminder > 0 && !_taskFailed"/*%FSM*/; + action=/*%FSM*/"_diag = selectRandom _taskReminder;" \n "[format [""%1"",_diag], 5] call Epoch_dynamicText;" \n - "_taskReminder = [];"; + "_taskReminder = [];"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class markers { itemno = 57; priority = 5.000000; to="clean_up"; - precondition = ""; - condition="!(isNil ""EPOCH_taskMarkerName"") && (_taskCleanup > 0 || _taskFailed)"; - action="deleteMarkerLocal EPOCH_taskMarkerName;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNil ""EPOCH_taskMarkerName"") && (_taskCleanup > 0 || _taskFailed)"/*%FSM*/; + action=/*%FSM*/"[player,_taskMarkerVis,EPOCH_taskMarkerName] remoteExec [""EPOCH_server_removeMarker"",2];" \n "_mkrName = nil;" \n - "EPOCH_taskMarkerName = nil;"; + "EPOCH_taskMarkerName = nil;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 56; priority = 0.000000; to="comms_1"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class gui { name = "gui"; itemno = 63; - init = "//GUI dialogue Options for Raymix :)"; - precondition = ""; + init = /*%FSM*/"//GUI dialogue Options for Raymix :)"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class no_dialogoue { itemno = 64; priority = 10.000000; to="items_and_vars"; - precondition = ""; - condition="_taskTitle == """""; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskTitle == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class dialogue { itemno = 65; priority = 5.000000; to="gui"; - precondition = ""; - condition="!(_taskTitle == """")"; - action="" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(_taskTitle == """")"/*%FSM*/; + action=/*%FSM*/"" \n "axeTaskTitle = _taskTitle;" \n "axeTaskDesc = _taskDesc;" \n "axeTaskImg = _taskImg;" \n "createDialog ""taskAccept"";" \n "" \n - "_taskTitle = """";"; + "_taskTitle = """";"/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class next_task { name = "next_task"; itemno = 68; - init = ""; - precondition = ""; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class mission_complete { itemno = 40; priority = 10.000000; to="end"; - precondition = ""; - condition="count _taskNextTrigger < 1 || !alive _plyr || _taskFailed || _doBin"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"count _taskNextTrigger < 1 || !alive _plyr || _taskFailed || _doBin"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class next_task { itemno = 79; priority = 5.000000; to="setup"; - precondition = ""; - condition="count _taskNextTrigger > 0 && !_taskFailed"; - action="_taskName = selectRandom _taskNextTrigger;" \n + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"count _taskNextTrigger > 0 && !_taskFailed"/*%FSM*/; + action=/*%FSM*/"_taskName = selectRandom _taskNextTrigger;" \n "diag_log format [""Trigger Next Task: %1"",_taskName];" \n - "_taskNextTrigger = [];"; + "_taskNextTrigger = [];"/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class comms_2 { name = "comms_2"; itemno = 70; - init = "" \n + init = /*%FSM*/"" \n "systemChat format [""SERVER CMD: %1"",_serverCmd];" \n "" \n - "_serverCmd = [];"; - precondition = ""; + "_serverCmd = [];"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class _ { itemno = 12; priority = 0.000000; to="event_conditions"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ + /*%FSM*/ class override_for_task { name = "override_for_task"; itemno = 75; - init = "_taskAuthor = axeValCacheList select 0;" \n + init = /*%FSM*/"_taskAuthor = axeValCacheList select 0;" \n "_taskTitle = axeValCacheList select 1;" \n "_taskSimple = parseNumber (axeValCacheList select 2);" \n "_taskDesc = ""Test Task"";" \n @@ -1247,30 +1615,35 @@ class FSM "_taskCompleteDiag2 = parseText axeValCacheList select 50;" \n "_taskReminder = axeValCacheList select 51;" \n "_taskNextTrigger = parseText axeValCacheList select 52;" \n - ""; - precondition = ""; + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ class simple_task { itemno = 72; priority = 10.000000; to="actions"; - precondition = ""; - condition="_taskSimple > 0;"; - action="_doSkip = true;"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_taskSimple > 0;"/*%FSM*/; + action=/*%FSM*/"_doSkip = true;"/*%FSM*/; }; + /*%FSM*/ + /*%FSM*/ class _ { itemno = 33; priority = 0.000000; to="comms"; - precondition = ""; - condition="true"; - action=""; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; + /*%FSM*/ }; }; + /*%FSM*/ }; initState="task_control"; finalStates[] = @@ -1278,3 +1651,4 @@ class FSM "end", }; }; +/*%FSM*/