summaryrefslogtreecommitdiffstats
path: root/Server/FSM/emptyvehiclescollector.fsm
blob: 40c2936f5fc9f95f16c116d93d2eb85c2636ea67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, emptyvehiclescollector">*/
/*%FSM<HEAD>*/
/*
item0[] = {"Init",0,250,69.011497,-125.277687,159.011566,-75.277672,0.000000,"Init"};
item1[] = {"Update_Empty_Veh",2,4346,67.881363,24.571560,157.881256,74.571510,0.000000,"Update" \n "Empty" \n "Vehicles"};
item2[] = {"End",1,250,-62.454956,96.990730,27.545134,146.990707,0.000000,"End"};
item3[] = {"Loop",4,218,68.212364,-51.053558,158.212402,-1.053517,0.000000,"Loop"};
item4[] = {"Gameover",4,218,-62.855103,24.549839,27.144907,74.549820,0.000000,"Gameover"};
link0[] = {0,3};
link1[] = {1,3};
link2[] = {1,4};
link3[] = {3,1};
link4[] = {4,2};
globals[] = {0.000000,0,0,0,0,640,480,1,19,6316128,1,-421.780701,421.779755,226.237854,-325.234192,748,514,1};
window[] = {0,-1,-1,-1,-1,837,154,1414,203,1,766};
*//*%FSM</HEAD>*/
class FSM
{
  fsmName = "emptyvehiclescollector";
  class States
  {
    /*%FSM<STATE "Init">*/
    class Init
    {
      name = "Init";
      init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Loop">*/
        class Loop
        {
          priority = 0.000000;
          to="Update_Empty_Veh";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Update_Empty_Veh">*/
    class Update_Empty_Veh
    {
      name = "Update_Empty_Veh";
      init = /*%FSM<STATEINIT""">*/"_vehicles = WF_Logic getVariable ""emptyVehicles"";" \n
       "{" \n
       "	if !(_x in emptyQueu) then {" \n
       "		_vehicles2 = WF_Logic getVariable ""emptyVehicles"";" \n
       "		emptyQueu = emptyQueu + [_x];" \n
       "		_x Spawn HandleEmptyVehicle;" \n
       "		_reloaded = _vehicles2 - [_x] - [objNull];" \n
       "		WF_Logic setVariable [""emptyVehicles"",_reloaded,true];" \n
       "	};" \n
       "} forEach _vehicles;" \n
       "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Gameover">*/
        class Gameover
        {
          priority = 0.000000;
          to="End";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Loop">*/
        class Loop
        {
          priority = 0.000000;
          to="Update_Empty_Veh";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "End">*/
    class End
    {
      name = "End";
      init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
      };
    };
    /*%FSM</STATE>*/
  };
  initState="Init";
  finalStates[] =
  {
    "End"
  };
};
/*%FSM</COMPILE>*/